You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`sorted_boxes` was first sorted, then used in an `#any?` check. In worst-case
time complexity, this is just as (in)efficient as checking against the
unsorted boxes.
We can do better by sorting boxes by beginning ascending and ending
descending. Algorithm explanation in comments.
0 commit comments