Skip to content

Instantly share code, notes, and snippets.

@trunkslamchest
Created August 30, 2020 17:38
Show Gist options
  • Save trunkslamchest/02c666d96400a7cfa4a8118ceb45ba2b to your computer and use it in GitHub Desktop.
Save trunkslamchest/02c666d96400a7cfa4a8118ceb45ba2b to your computer and use it in GitHub Desktop.
blog30_solution3.js
var minSubsequence = function(nums) {
let sum = nums.reduce((a, b) => a + b )
let subSum = 0
let sub = []
nums.sort((a, b) => a - b)
// iterate through nums (which is now sorted) backwards
for(i = nums.length - 1; i >= 0; i--){
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment