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.
fair, lmao 😂
that's lowkey rude considering some, including me are new to development.
Aaamen :D
To be fair, almost no tutorials teach you Big-O properly. I consistently hear of people that first learned about time and space complexity like 2-5 years after they already begun working as a developer.
For some reason this isn't taught and unless you prepare for interviews at companies like google, you likely won't hear of this early on.
I think it should be taught though, it really helps writing better code.
I wasn't aiming for any kind of performance target when I wrote mine, just throwing something together so I could read the spoiler'd comments in this discussion. I definitely could have been a bit more polite, too.
That's what I'm trying to say, though; your criticism is just not correct in general. There are plenty of scenarios in which the nested loops strongly outperform your solution, even with the recompiling issue fixed.
Your solution has mistakes in it (using a new regex object every function call) and is also noticeably slower than the nested loop solution when profiled. Don't be so quick to criticise, the superiority thing is cringeworthy.
nice explaination
Are you sure you read the whole description?
This comment is hidden because it contains spoiler information about the solution