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.
Finally, there is one empty table for two and another one used for ne group of two clients.
The first and second clients may have been proposed a table for two if a > 0 and if all tables for one were used.
Yes,
(...looks like moon phases to me... 8o ... XD )
Nice one.
I suggest to add a visual description.
First example :
1 || 🌕 || 🌑 🌑 || 0
2 || 🌕 || 🌕 🌑 || 0
1 || 🌕 || 🌕 🌗 || 0
1 || 🌕 || 🌕 🌕 || 0
Denied : 0
Second example :
1 || 🌕 || 🌑 || 0
1 || 🌕 || 🌗 || 0
2 || 🌕 || 🌗 || 2
1 || 🌕 || 🌕 || 0
Denied : 2
13 people are denied service, and
13
is the expected answer. Where's the problem?in javascript, total denied number is more than N group, and even bigger than N person, is it a bug?
restaurant( 2, 1, [2,1,2,2,2,2,1,2,1,2] ) = 13 ???