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.
thanks for reply yes i now see that i made it far too complicated i just refactored it into something so much simpler
considering im a new programmer, most of hard level 7 katas i just quit within 15 minutes but this one i pushed through for almost an hour and managed to somehow solve the problem, the code is rather long compared to the top answers but the big O notation is O(N) which is the same as the top answers, so it does have the same runtime efficiency, not sure about the space complexity but im pretty proud of this one considering im writing this long ass comment which no one will read about how much dopamine getting this function brought me. If you have any suggestions other than "use this library and just do this one liner which i copied of a stack overflow answer not knowing what it does" im happy to hear!
i think i went a bit overboard lol
feel kinda dumb lol