Skip to content

Instantly share code, notes, and snippets.

View thatshailesh's full-sized avatar
🎯
Focusing

Shailesh thatshailesh

🎯
Focusing
View GitHub Profile
@thatshailesh
thatshailesh / ultimate-ut-cheat-sheet.md
Created March 23, 2018 05:16 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


@thatshailesh
thatshailesh / threeSum.js
Last active September 30, 2017 16:44
Find three numbers whose sum is 0 in an array
var threeSum = function(nums) {
let sets = [];
let temp = []
nums.sort((a, b) => {
return a - b;
});
for (let i = 0; i < nums.length; i++) {
let target = -nums[i];
let front = i + 1;