Skip to content

Instantly share code, notes, and snippets.

View nuxy's full-sized avatar
☠️
I am altering the code. Pray I don't alter it any further.

Marc S. Brooks nuxy

☠️
I am altering the code. Pray I don't alter it any further.
View GitHub Profile
@nuxy
nuxy / leetcode-11
Created March 16, 2024 01:09
LeetCode > 11. Container With Most Water (JavaScript solution)
/**
* Container With Most Water
*
* @param {Number} height
* String of characters (subsequence of t).
*
* @return {Number}
*
* @see https://leetcode.com/problems/container-with-most-water/?envType=study-plan-v2&envId=leetcode-75
*/
@nuxy
nuxy / leetcode-392
Created March 15, 2024 19:22
LeetCode > 392. Is Subsequence (JavaScript solution)
/**
* Is Subsequence
*
* @param {String} s
* String of characters (subsequence of t).
*
* @param {String} t
* String of characters.
*
* @return {Boolean}
@nuxy
nuxy / leetcode-283
Created March 15, 2024 09:17
LeetCode > 283. Move Zeroes (JavaScript solution)
/**
* Move Zeroes
*
* @param {Array<Number>} nums
* Array of numbers.
*
* @see https://leetcode.com/problems/move-zeroes/description/?envType=study-plan-v2&envId=leetcode-75
*/
const moveZeroes = function(nums) {
for (let i = 0; i < nums.length; i++) {
@nuxy
nuxy / leetcode-443
Created March 15, 2024 08:46
LeetCode > 443. String Compression (JavaScript solution)
/**
* String Compression
*
* @param {Array<String>} chars
* Array of strings.
*
* @return {Number}
*
* @see https://leetcode.com/problems/string-compression/description/?envType=study-plan-v2&envId=leetcode-75
*/
@nuxy
nuxy / leetcode-334
Created March 14, 2024 19:17
LeetCode > 334. Increasing Triplet Subsequence (JavaScript solution)
/**
* Increasing Triplet Subsequence
*
* @param {Array<Number>} nums
* Array of numbers.
*
* @return {Boolean}
*
* @see https://leetcode.com/problems/increasing-triplet-subsequence/?envType=study-plan-v2&envId=leetcode-75
*/
@nuxy
nuxy / leetcode-238
Created March 13, 2024 20:52
LeetCode > 238. Product of Array Except Self (JavaScript solution)
/**
* Product of Array Except Self
*
* @param {Array<Number>} nums
* Array of numbers.
*
* @return {Array<Number>}
*
* @see https://leetcode.com/problems/product-of-array-except-self/?envType=study-plan-v2&envId=leetcode-75
*/
@nuxy
nuxy / leetcode-151
Created March 13, 2024 03:37
LeetCode > 151. Reverse Words in a String (JavaScript solution)
/**
* Reverse Words in a String
*
* @param {String} s
* String of characters.
*
* @return {String}
*
* @see https://leetcode.com/problems/reverse-words-in-a-string/?envType=study-plan-v2&envId=leetcode-75
*/
@nuxy
nuxy / leetcode-345
Created March 13, 2024 03:27
LeetCode > 345. Reverse Vowels of a String (JavaScript solution)
/**
* Reverse Vowels of a String
*
* @param {String} s
* String of characters.
*
* @return {String}
*
* @see https://leetcode.com/problems/reverse-vowels-of-a-string/?envType=study-plan-v2&envId=leetcode-75
*/
@nuxy
nuxy / leetcode-605
Created March 13, 2024 02:28
LeetCode > 605. Can Place Flowers (JavaScript solution)
/**
* Can Place Flowers
*
* @param {Array<Number>} flowerbed
* Array of plots.
*
* @param {Number} n
* Number of additions.
*
* @return {Boolean}
@nuxy
nuxy / leetcode-1431
Created March 13, 2024 01:52
LeetCode > 1431. Kids With the Greatest Number of Candies (JavaScript solution)
/**
* Kids With the Greatest Number of Candies
*
* @param {Array<Number>} candies
* Array of numbers.
*
* @param {Array<Number>} extraCandies
* Array of numbers.
*
* @return {Array<Boolean>}