Problem Statement  
You are watching a car race. Each car starts a different point on the xaxis, travels at the same speed, and starts at the same time. However, each car is travelling along a different road (which extends to infinity in one direction, and is stopped by the xaxis in the other direction), and each road has its own direction specified by an angle between 1 and 179, inclusive. An angle of 90 indicates that the road heads directly in the positive y direction, while an angle of 1 indicates that the road heads just a little bit north of the positive x direction. Note that cars never head in the negative y direction. Sometimes, two or more roads intersect at some point. When this happens, the car that reaches the intersection first is able to block the intersection so that no other cars can pass through it. If two cars reach an intersection at the same time, the one with the lower index passes, while the other one is blocked. In this picture, the cars following the red paths make it through all of the intersections, while the cars on the gray paths are blocked. You will be given a int[] angles, where the i^{th} element of angles is the angle between the xaxis and the road that the i^{th} car drives on, in degrees. The order of the elements of angles corresponds to the order of the cars along the xaxis (no two cars start at the exact same location), with the first element of angles corresponding to the car with the leftmost starting position on the xaxis. Your method should return a int[] containing the 0based indices of all the cars that will pass all of the intersections along their roads. Your return should be sorted in ascending order. Note that the exact locations of the cars along the xaxis do not matter. All that matters is their order, and the directions in which they head.  
Definition  
 
Constraints  
  angles will contain between 1 and 50 elements, inclusive.  
  Each elemtent of angles will be between 1 and 179, inclusive.  
Examples  
0)  
 
1)  
 
2)  
 
3)  
 
4)  
 
5)  
 
6)  
