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.
At least the footnotes whose number is the square of a prime number.
It really depends on your mathematical background. If you're familiar with sequences and bitwise operations, it's quite trivial. Otherwise, it can take you quite a while.
Good luck solving it though, I hope you figure it out :)
/*
A new movie has just been released! There are a lot of people at the cinema box office standing in a huge line. Each of them has a single 100, 50 or 25 dollar bill. A movie ticket costs 25 dollars.
Harry is currently working as a clerk. He wants to sell a ticket to every single person in this line.
Can Harry sell a ticket to every person and give change if he initially has no money and sells the tickets strictly in the people queue order?
Return YES, if Harry can sell a ticket to every person and give change with the bills he has at hand at that moment. Otherwise return NO.
EXAMPLES:
tickets([25, 25, 50]); // => YES
tickets([25, 100]); // => NO. Harry will not have enough money to give change to 100 dollars
tickets([25, 25, 50, 50, 100]); // => NO. Harry will not have the right bills to give 75 dollars of change (you can't make two bills of 25 from one of 50)
*/
Closing.
Your code returned
['NORTH']
but it should've been['NORTH'; 'NORTH']
. What was the input case?The description says and each word is important
I think the answer of the second one is 24 , there is no problem. I just don't understand the third one.
I think the answer of it is 1, how can it be 2 ? system A : 10 dollars System B: 0 + 10 * 0.95 = 9.5 dollars