Skip to content

Instantly share code, notes, and snippets.

Alex Corre alexcorre

Block or report user

Report or block alexcorre

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
alexcorre /
Created Aug 17, 2017
export NPM_TOKEN in your shell
# add the following somewhere your shell will source .bash_profile, .bashrc, .zshrc, etc.
export NPM_TOKEN=$(cat ~/.npmrc | sed 's/.*authToken=\(.*\)/\1/')
View endZeros.js
Challenge: Write a function that checks if all the zeros of an array are at the
end (an array with no zeros in it does have all its zeros at the end). An empty
array also has all its zeros at the end.
The function should run in O(n) time, and it's okay if it always runs in O(n).
The objective here is "elegance" (ease of reading the code), not
Inspired by this real world Ruby discussion:
You can’t perform that action at this time.