I always have mixed reactions when looking at other solutions as they're usually the 'make-it-1-line' solutions which wouldn't ever be used in a corporate environment. However, I thoroughly enjoyed seeing your solution as it makes so much sense (Annoyed I didn't think like this) and is easy to read.
Thank you for the feedback. Glad you enjoyed the solution and got something out of it.
I always have mixed reactions when looking at other solutions as they're usually the 'make-it-1-line' solutions which wouldn't ever be used in a corporate environment. However, I thoroughly enjoyed seeing your solution as it makes so much sense (Annoyed I didn't think like this) and is easy to read.
As long as a solution is written in accordance with the kata requirements and not written to bypass anti-cheats, then it is a valid one.
wow, if i think that i'm doing that with a lot of rows i feel bad, but now i know Set's power
Это O(n) а можно O(1)
I was thinking the same thing, I had never thought of using this syntax in functions arguments, useful
This is pretty clever, my solution was nothing like this.
Сначала расстроился что мой код длинее, потом обрадовался что в два раза быстрее
i can't believe i wasn't able to find this solution...
kudos to you
больше похоже на n^2
Short, but when intervals are very big, this solution will get into trouble...
прямая зависимость, кмон
ну а если там цифры в млн будут. это ж сколько перебрать надо
Nice! Learned a new neat trick.
do you solve it? i cant understand how we can solve this with this explanation
Loading more items...