Wow! A fast solution that didn't use Chinese remainder theorem.
I used a brute-force approach too, but mine is much slower because I used a 'fixed' block/interval (for 3 biggest buses), which I need to calcculate in before. Sort of the same concept, but I didn't realize I could use a 'varying' interval size.
Great solution! 👏👏👏
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Wow! A fast solution that didn't use Chinese remainder theorem.
I used a brute-force approach too, but mine is much slower because I used a 'fixed' block/interval (for 3 biggest buses), which I need to calcculate in before. Sort of the same concept, but I didn't realize I could use a 'varying' interval size.
Great solution! 👏👏👏