Collision algorithm with O(N) complexity