ABC Interview Question

Technical stuff was good to take it forward