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.
don't need to initialize a new variable (i) u can use n directly
Didn't know this. Thanks!
"arr should be const; (maybe the code was too old and that was not well established back in the day)"
I'm new to this, why should it be const? Should all arrarys be declared with const?
Clever, didn't think of using i=n and the i-- to countdown. Would have made my solution just a tad bit shorter.
You're a genius!
I wrote the same way
Ah, that makes sense. I'll have to declare those in the future. Thank you for explaining :)
This comment is hidden because it contains spoiler information about the solution
Crazy how I wrote almost the exact same thing! Is the usage of let encouraged in a for loop? I made mines without it.
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
66666,精辟啊
Hello there,
I like your solution, which uses set(). I'm not really familiar with Set(). Can you explain the last line (total2 * 2 - total1), why do you need to multiply set by 2?