This program finds how many fish are left alive after being given their sizes, position, and direction of travel. It has a time complexity of O(N).