Anonyome Labs interview question

To solve a dsa related question