edX interview question

Review, explain and edit an algorithm in python. Not very structure and very vague.