Certa (CA) interview question

Python coding question using data structures and algorithms