Spilled coffee on the forward slash key and didn't know another way to divide by two. I was also unable to post questions... they all looked like sentences with no punctuation at the end. It was a rough day.
You are totally right. Thanks for this comment. But a lot of time has passed since I wrote this. And it was just like "hmmm, can I write it in one line in a couple of minutes?". Now I'm working as a middle .Net developer and I would never do that in my production code. My Upper solution is extremely slow.
It's a valid solution as long as it only contains single words.
With a seperator you're basically back to an array again, except for speed / memory usage maybe.
Good solution in this case, but no best practice i'd guess. :)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
ty mate. That's exactly what I thought too.
then make one lol
its called community effort...
Why should he win if there are no dragons to fight?
Spilled coffee on the forward slash key and didn't know another way to divide by two. I was also unable to post questions... they all looked like sentences with no punctuation at the end. It was a rough day.
Here, not only twice, but 2 * str.lenght times.
You are totally right. Thanks for this comment. But a lot of time has passed since I wrote this. And it was just like "hmmm, can I write it in one line in a couple of minutes?". Now I'm working as a middle .Net developer and I would never do that in my production code. My Upper solution is extremely slow.
Sorry, but you're wrong. I win.
ok read this https://stackify.com/premature-optimization-evil/
It's a valid solution as long as it only contains single words.
With a seperator you're basically back to an array again, except for speed / memory usage maybe.
Good solution in this case, but no best practice i'd guess. :)
you're kidding, right
You want to say that such a solution does not pass the tests?
This comment is hidden because it contains spoiler information about the solution
Note that when discussing a solution, if you don't mark your post as having spoiler content, it's visible in the homepage.
Loading more items...