Yodle interview question

some case based algorism question