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.
The best practice is to write such constructions in reverse:
word.equals("") -> "".equals(word)
Why? Because this way we exclude NullPointerException, because "" will never be null, but word does not give such guarantees :) Good luck in learning!
I like it.
Hello, can you pleae explain to me what does ("\w?\*\w?", "_") this do? i know it has something to do with escape sequences and regex but im not finding a clear explanation for it online. Thank you.
".(.)(.*)(.)" - in this regex we split our word into four blocks
and then we get only first (numeration starts from zero), second and third blocks and change their order "$3$2$1".
This comment is hidden because it contains spoiler information about the solution
O(N^2) but otherwise a clean solution.
This comment is hidden because it contains spoiler information about the solution