git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
### Keybase proof | |
I hereby claim: | |
* I am kevingomezdev on github. | |
* I am kaxz (https://keybase.io/kaxz) on keybase. | |
* I have a public key ASCo06wmFllAeGm6nlA9qxGSQRIqt2bxB7XC57bAndBtpgo | |
To claim this, I am signing this object: |
//Having a list of n digits (0 <= digit <= 9), where n less than or equal to 100, arrange it to move all 0 to right in O (n) time. | |
//Example [4, 8, 0, 9, 2, 5, 0, 3, 3, 0] -> [4, 8, 9, 2, 5, 3, 3, 0, 0, 0] | |
//You must display this list in the console. | |
//After this, the previous list without zeros ([4, 8, 9, 2, 5, 3, 3]) will represent a fictitious integer (4892533). You should add 1 unit to it, leaving the final list as [4, 8, 9, 2, 5, 3, 4]. You must display this list in the console. | |
function moveCeroToRight(numbers) { | |
let count = 0 | |
for (let i = 0; i < numbers.length; i++){ | |
if(numbers[i] !== 0) { | |
numbers[count++] = numbers[i]; |