I hereby claim:
- I am marcogbarcellos on github.
- I am marcogbarcellos (https://keybase.io/marcogbarcellos) on keybase.
I hereby claim:
function Node(value){ | |
this.value = value; | |
this.next = null; | |
} | |
function LinkedList() { | |
this.start = null; | |
this.length = 0; | |
} | |
LinkedList.prototype.push = function (val) { |
function fibonnacci(n) { | |
if (n === 0) { | |
return 0; | |
} | |
else if (n === 1) { | |
return 1; | |
} | |
else { | |
return fibonnacci(n-1)+fibonnacci(n-2); | |
} |
//We can check that the Recursive Version of Palindrome is way faster... | |
function palindromeRecursive(n) { | |
var nArr = n.split(''); | |
if(nArr.length <= 1) { | |
return true; | |
} | |
else { | |
if(nArr[0] === nArr[nArr.length-1]){ | |
return palindromeRecursive(n.slice(1, nArr.length-1)); | |
} else { |
function Node(value){ | |
this.value = value; | |
this.left = null; | |
this.right = null; | |
} | |
function BinarySearchTree() { | |
this.root = null; | |
} | |
BinarySearchTree.prototype.push = function (val) { |