Infosys interview question

Array, pattern , Linked List question