- browser looks for the DNS cache
- browser ask the OS to find the ip
- OS makes a DNS lookup to find the ip and gives to the browser * Looks for the closest DNS Server to find the IP, if it's not there the DNS Server looks for another DNS Server until finds it
- OS caches the IP
- browser opens a tcp connection( If it's HTTPS this step is waay more complicated)
- browser sends an http request
- browser receives an http response and may close the connection or reuse for more requests.
- browser checks what kind of response se he receives: 3xx redirect or conditional, 401 authorization required, 4xx and 5xx errors or 2xx "good" responses
- If cacheable, browser caches response
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
function Node(value){ | |
this.value = value; | |
this.left = null; | |
this.right = null; | |
} | |
function BinarySearchTree() { | |
this.root = null; | |
} | |
BinarySearchTree.prototype.push = function (val) { |
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
//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 { |
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
function fibonnacci(n) { | |
if (n === 0) { | |
return 0; | |
} | |
else if (n === 1) { | |
return 1; | |
} | |
else { | |
return fibonnacci(n-1)+fibonnacci(n-2); | |
} |
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
function Node(value){ | |
this.value = value; | |
this.next = null; | |
} | |
function LinkedList() { | |
this.start = null; | |
this.length = 0; | |
} | |
LinkedList.prototype.push = function (val) { |
I hereby claim:
- I am marcogbarcellos on github.
- I am marcogbarcellos (https://keybase.io/marcogbarcellos) on keybase.