Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
With ES6 the last line can be changed to
return Math.min(...numCakes);
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Hardcoded the answers to tests XD
This comment is hidden because it contains spoiler information about the solution
yes but it doesn't work with very large numbers
ex. seven(30000000000) = [-1294967296, 1].
Math.trunc() is better practice.
Read more here: https://stackoverflow.com/questions/7487977/using-bitwise-or-0-to-floor-a-number