Capgemini Engineering Interview Question

Simple datastructure logics?