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.
my head bobo
That would be the case if he had the array starting from "I love you" as the first element.
Holy shit that's genius
no way the solution was just brute forcing it, it makes sense though cause you only swap near the beginning
This comment is hidden because it contains spoiler information about the solution
No, it will fail with an
ArrayIndexOutOfBoundsException
.my face reading this be like: [^_-]
It means that by snydergd's definition and mine, your description of this solution makes it clever as it is efficient, doesn't use obscure language features and can be used in prod. If you feel like this solution is as you described it and is not clever, your definition of clever seems to be a bad definition.
I'm so mad I didn't think of this lol
This comment is hidden because it contains spoiler information about the solution
Nice solution. By the way, I have a question - is this solution O(n^2) (one n from loop and another from 'in' operator), or it is more efficient?
Big Brain
Could be people copying answers they want to dissect and understand better and then clicking "Submit" to run against the attempt test cases instead of forking them.
return
is incorrect
Beautiful layout!
Loading more items...