Yes clever but for large intervals [1, 1e25] or long arrays of intervals, this is not the best practice. I think best practice should also be efficient.
I used 4 regex expressions to get to this result (and upvoted similar answers). But after reading the explanation, I now understand I should have used this. Thanks for taking the time to break it down.
Well why do you know the variable [i] if loop starting from min
//Sorry, my English is weak.
Hi David. Which part in particular?
I can go into detail for any part written, if you like.
Regards
I don't understand this :(
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
+1
I feel the same way. The artificial constraints make this an anti-kata, or a lesson how not write Javascript.
Yes clever but for large intervals [1, 1e25] or long arrays of intervals, this is not the best practice. I think best practice should also be efficient.
I used 4 regex expressions to get to this result (and upvoted similar answers). But after reading the explanation, I now understand I should have used this. Thanks for taking the time to break it down.
I used a similar approach. Much more readable than the most voted answer +1
I feel this kata didn't help me advance in any way
Everbody is hating on the solution? I think it was pretty clever and works perfectly fine for a small quantity of entries
I would love to learn more about this approach, as I don't understand it completely. Can you ellaborate?