Kevala interview question

Performed algorithms using python .