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.
This comment is hidden because it contains spoiler information about the solution
The description says input array will never be empty but one of the test case in Java tests against empty array.
This Problem is so weird. I solved it with JavaScript, but when I try to solve it with the same logic by PHP, it passes the test but doesn't pass the attempt because failed to assert one of the test cases. Even though I try to make ChatGPT solve it with PHP, he fails also.
CoffeeScript translation
Nasm translation