Duolingo Interview Question

it was mainly on data structure and algorithms