This code results in the printing of elements alternatively in linked list
suppose 10 || ----> 20 || ------> 30 || ------> 40 || -------> 50 || NULL
prints(10) head->next->next ------->3rd node
prints(30) head->next->next ------->5th node
prints(50) here head->next is null prints(50) and again moves back prints results in reverse
10 30 50 50 30 10
if(head == null) ---------------- if head is null nothing is done
return