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.
please do not post solutions in the discourse, otherwise anyone can see it without the spoiler flag. I have added the flag to your comment.
This comment is hidden because it contains spoiler information about the solution
So concise & logical!!! I though it may cause some errors reports if the size of arr is below 3.But I am wrong, because range() can handle it perfectly
So succinct! Very nice!
Mixing
bool
andint
is like planting a bomb for your colleagues.None
suits better.What if needle does not exist in haystack ?!
saving a line break, does it really make the code faster? xD
Very nice way of getting the peak values
Had to paste this solution into VS Code and do a debug run to see how it deals with plateaus. It is really good thinking!
Wow, didn't know you could define a function with an output in one line.
This comment is hidden because it contains spoiler information about the solution
molto bene! :chef's_kiss:
The one example you showed using f string doesn't seems to work for me.
Update : sorry I should have put double quotation "needle" instead of 'needle'
I do the exact same thing then see someone being cleverer as always. I learn so much from this website! Also lambda would be even shorter
This comment is hidden because it contains spoiler information about the solution
Loading more items...