Appinventiv interview question

Algorithms