ABC interview question

Oops concept , arrays, string, coding