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.
Bro, you best
This is sick :)
nice1
Now this is some beyond-human-brain-level logic to achieve O(1). Love the mathematics lovers in this platform.
its also difficult to understand ternary operators logic at first sight.
you're brilliant hahahahahaha
I love you
traditional language need traditional solution
This comment is hidden because it contains spoiler information about the solution
Why does this work? Doesn't ".reduce((a, b) -> -1)" mean that int i will always be -1?
No way lol.
Made me chuckle irl XD
I dropped a follow, can't wait to see more like this.
very fantastic solution
LOL
And is correct that way because inputs "... are always lowercase strings, and that each has at least two letters.". If that was not the case and arbitrary inputs would be allowed we'd also need checks for
null
and lengths in order to avoidNullPointerException
andIndexOutOfBoundsException
or alike.Loading more items...