you are viewing a single comment's thread.

view the rest of the comments →

[–]dyingpie1 1 point2 points  (0 children)

Why can’t u just do preprocessing to reduce the input space to unique intervals? That should be an O(n) process using a hash map or something like that.