This file contains 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
/* | |
Return the largest value in an array of non-negative integers | |
*/ | |
function largestInt(arr) { | |
if (arr.length === 0) { | |
return -1; | |
} | |
return arr.reduce(comparator); |
This file contains 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
class Node { | |
constructor(data) { | |
this.data = data; | |
this.children = []; | |
} | |
add(data) { | |
this.children.push(new Node(data)); | |
} | |
This file contains 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
alias ip='ifconfig | grep "inet " | grep -v 127.0.0.1 | cut -d\ -f2' |
OlderNewer