LinkedIn Interview Question

2 sums