Tag Archives: Linked list interview question

Group even and odd numbers in a linked list

Group even and odd numbers in a linked list Problem statement for segregating even and odd numbers in a linked list: Given a singly linked list, you have to group the even numbers and the odd numbers. The even numbers’ group must be ahead the group of odd numbers. Also, each number in the groups… Read More »

Reverse a Linked List

Reverse a Linked List This post deals with the question how to reverse a linked list? A linked list can be reversed either recursively or iteratively. Reverse a Linked List Problem Statement: Given a Linked List and its the pointer to its head, reverse the linked list. Reverse a Linked List Problem Solution: Iterative Solution: Here… Read More »