Accuknox interview question

DSA Problem solving in python