This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param {number[]} height | |
* @return {number} | |
*/ | |
var maxArea = function(height) { | |
let left = 0 | |
let right = height.length - 1 | |
let answer = 0 | |
while(left < right) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param {number[]} nums | |
* @return {number[][]} | |
*/ | |
var subsets = function(nums) { | |
if(nums.length < 2) return nums | |
let result = [] | |
function recurse(i, temp) { |