Nagarro Interview Question

Basic question on data structure and algorithms