recursive functionSample

Node are reveresed

second last node become last node and last node become first