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.
Due to performance issue, it is recommended that you use "new String[0]" and not ArrayList.size().
Reference: https://stackoverflow.com/questions/4042434/converting-arrayliststring-to-string-in-java
Obviously HackerRank, being a competitive programming site, will impose performance requirements. So unless you write the (roughly) most performant algorithm, it will not pass there.
You can go under Kata/Completed in your profile to see all completed katas. If you want the code, you can open an already completed kata and choose "Past Solutions" in the left side with Instructions and Output. Solutions/Completed on your profile also work.