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 😂
highkey rude, I was being a dirk
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.
This comment is hidden because it contains spoiler information about the solution
Yeah, i'm not only an asshole, i'm an idiot! Nah, just had a miserable night and morning, thanks for not responding in kind. Looks like from doing some testing you're mostly right, though it varies, and funnily your own solution is five times slower than a regex one, guessing it's the iterators under the hood in those native method loops, but it looks clean and is very descriptive.
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.
this site should be renamed lets troll student programmers
so many trolls on here. i am just a student programmer fyi peeps.
blerg
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.
The fact that this got nearly 500 best practices votes and it uses a completely unnecessary/deleterious loop inside of a loop says a lot about a lot of programmers 😅
I've never seen anything so sanitized
...and yet so filthy 🤮
Loading more items...