LinkedIn Interview Question

nothing was unexpected, simple algorithm questions