ABC interview question

add an array and print output