ABC interview question

Technical