Question d’entretien chez Turing

He asked me to solve 1 medium level DSA question in python