Bloomberg Interview Questions
From Software Engineers Wiki
- Image an airport with the control tower having a constantly rotating radar scanning for airplanes. The radar's coordinates in the 2-d plane are (0,0). The radar has an API: void scan(const Plane &P) that is called periodically whenever the radar detects a plane. You can imagine that the Plane structure has x,y coordinates for that plane. You should fill in the function Scan, such that at any given time you are able to return the 100 closest planes to the tower (0,0).
- Given an array A = [3, 7, 2,5,6,4] for a number N, print the pairs from that array A that sums up to N. You should print each pair once.
- Given an array A [0, 1, 3, 4, 9, 5, 7, 6, 2] and number N. This means that the array consists of the numbers from 0 ... N. However, as you see, 8 is missing in A. Print the missing number. Think about the case N = 10^6.
- Find summation of n records added in past 60 secs.
- Find first occurrence of any character of str2 in str1.
- Move zero elements in an array to the end.
- Inspect codes.
- Data structures for tick server.
- Sort names with Roman numeric.