Infosys Interview Question

Array, pattern , Linked List question