Shweta interview question

coding: reverse an array and linked list.