Compute prices, distances, and Top-K for orders | Coinbase Interview Question