DMI Finance interview question

Geeks for geeks top 10 puzzles