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.
Just so you know, on a short string ("Success") this solution executes in 49 ns, and your solution in 189 ns.
Asymptotic complexity is not so relevant with short inputs.
This comment is hidden because it contains spoiler information about the solution
interesting that it uses bitmasks yet is still really inefficient
This comment is hidden because it contains spoiler information about the solution
noice!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
whatta hell
no thanks
Stringless, nice.
That called a true rustacean
Bro, I don't like to use ChatGPT for code. Out of interest, I just asked it to solve this task, and it produced the naive solution that Nicolas proposed below.
It would be O(n log n). This solution is O(n).
why do you used chat gtp's solution? we are here to learn something and not just for copy-past
Винницианский дракон, он же - "Папич". К вашим услугам
Loading more items...