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
sortedList = [11, 24, 33, 64, 95, 106, 217, 228, 299, 310] | |
const getMid = (low, high) => { | |
return Math.floor((high + low) / 2) | |
} | |
const recursiveBS = (list, item, low, high) => { | |
(!low && !high ) && (low = 0, high = list.length - 1) | |
let found = false |
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
const sortedList = [1,2,3,4,5,6,9,11,12,13,14,15,16,17,18,19,20] | |
const binarySearch = (list, item) => { | |
let low = 0 | |
let high = list.length - 1 | |
let guess = null | |
while(low <= high) { | |
let mid = Math.floor((high + low)/2) | |
guess = list[mid] |
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
#!/bin/bash | |
target_branch="gh-pages" | |
working_tree="/home/meherranjan/aerosailor.com" | |
while read oldrev newrev refname | |
do | |
branch=$(git rev-parse --symbolic --abbrev-ref $refname) | |
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then | |
NewerOlder