Skip to content

Instantly share code, notes, and snippets.

View alexbelyeu's full-sized avatar

Alex Belyeu alexbelyeu

View GitHub Profile
@lqt0223
lqt0223 / knapsack.js
Created April 11, 2017 11:52
20 0-1 Knapsack problem in JavaScript
/* 0-1 knapsack problem
For an overall introduction to knapsack problem, see https://en.wikipedia.org/wiki/Knapsack_problem
Function name: knapsack
Param:
items: an array of {w: v:} (where 'w' stands for weight, and 'v' stands for value)
capacity: a positive integer number
Will return max sum value that can reach, and the chosen subset to add up to the value.
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active June 12, 2024 03:08
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\