Skip to content

Category Archives: Linked List

Given a linked list A[] of N integers, the task is to reverse the order of all integers at an even position. Examples: Input: A[]… Read More
Given two sorted lists, merge them so as to produce a combined sorted list (without using extra space).Examples: Input: head1: 5->7->9 head2: 4->6->8 Output: 4->5->6->7->8->9… Read More
Given two sorted lists, merge them so as to produce a combined sorted list (without using extra space).Examples: Input: head1: 5->7->9 head2: 4->6->8 Output: 4->5->6->7->8->9… Read More
Given two sorted lists, merge them so as to produce a combined sorted list (without using extra space).Examples: Input: head1: 5->7->9 head2: 4->6->8 Output: 4->5->6->7->8->9… Read More
Given two sorted lists, merge them so as to produce a combined sorted list (without using extra space).Examples: Input: head1: 5->7->9 head2: 4->6->8 Output: 4->5->6->7->8->9… Read More
Given a linked list where every node represents a linked list and contains two pointers of its type:  Pointer to next node in the main… Read More
Given a linked list where every node represents a linked list and contains two pointers of its type:  Pointer to next node in the main… Read More
Given a linked list where every node represents a linked list and contains two pointers of its type:  Pointer to next node in the main… Read More
Given a linked list where every node represents a linked list and contains two pointers of its type:  Pointer to next node in the main… Read More
Given a singly linked list, Your task is to remove every K-th node of the linked list. Assume that K is always less than or… Read More
Given a singly linked list, Your task is to remove every K-th node of the linked list. Assume that K is always less than or… Read More
Given a singly linked list, Your task is to remove every K-th node of the linked list. Assume that K is always less than or… Read More
Given a singly linked list, write a function to swap elements pairwise. Input: 1->2->3->4->5->6->NULL  Output: 2->1->4->3->6->5->NULL Input: 1->2->3->4->5->NULL  Output: 2->1->4->3->5->NULL Input: 1->NULL  Output: 1->NULL For… Read More
Given a singly linked list, write a function to swap elements pairwise. Input: 1->2->3->4->5->6->NULL  Output: 2->1->4->3->6->5->NULL Input: 1->2->3->4->5->NULL  Output: 2->1->4->3->5->NULL Input: 1->NULL  Output: 1->NULL For… Read More
Given a singly linked list, write a function to swap elements pairwise. Input: 1->2->3->4->5->6->NULL  Output: 2->1->4->3->6->5->NULL Input: 1->2->3->4->5->NULL  Output: 2->1->4->3->5->NULL Input: 1->NULL  Output: 1->NULL  For… Read More

Start Your Coding Journey Now!