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.
For such a short string is not something to bother about, and it feels cleaner for this specific problem
exactly my thoughts!
Very impactful.
This comment is hidden because it contains spoiler information about the solution
Its an intuitive idea and makes sense but no, I ran your code vs the code above in a speed checker, with the worst case senario, where every test was more than 5 likes but less than 200, the speed for both over 10 billion iterations is about 1.2 - 1.3 billion operations per second, so both run about the same speed, it seems to be so marginal that its up to your prefrence which to use.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
He is already accounting for an empty array with Case 0, so what does that line 2 add?
yup but if he use break like my solution it will be more faster
Switch is not best practice. It looks prettier sure, but its actually slower than a simple if statement. Not by a lot though.
This comment is hidden because it contains spoiler information about the solution
developer choice, but its not needed and will be omitted
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...