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.
is groupMapReduce() a new thing ?
Love this implementation!
That is it!
I did not consider that case.
Thank you!
Just a suggestion for those of you having trouble... A $50 bill does not equal two $25 bills. You have to think of each bill as a whole unit because you have an empty cash register, and can't make change until you're given it.
I think that your problem probably stems from the fact that you can also give change for a $100 bill in the form of one $50 bill and one $25 bill (instead of three $25 bills).
Hi everyone! I have troubles when I run this code, I pass all tests but when passing the number six
I get an error and I do not understand why as I think my code should work well. help me please,
I am very desperate. what i do is to count the number of bills of 25 i get and the change from 50
should be 1 bill and from 100 should be 3 bills. So I sum the number of 50s and three times 100s I get and then
see which one is bigger to return the result of the function
def tickets(people):
num_25 = 0
num_50 = 0
num_100 = 0
for i in range(len(people)):
if people[i] == 25:
num_25 = num_25 + 1
elif people[i] == 50:
num_50 = num_50 + 1
else:
num_100 = num_100 + 1
nec_25 = num_50 + 3 * num_100
if nec_25 < num_25 or nec_25 == num_25:
return 'YES'
else:
return 'NO'