##
QuickSort on Singly Linked List
June 28, 2013

QuickSort on Doubly Linked List is discussed here. QuickSort on Singly linked list was given as an exercise. Following is C++ implementation for same.

June 28, 2013

QuickSort on Doubly Linked List is discussed here. QuickSort on Singly linked list was given as an exercise. Following is C++ implementation for same.

June 11, 2013

Given a linked list and two integers M and N. Traverse the linked list such that you retain M nodes then delete next N nodes, continue the same till end of the linked list. Difficulty Level: Rookie

May 10, 2013

Given a singly linked list, swap kth node from beginning with kth node from end. Swapping of data is not allowed, only pointers should be changed.

April 25, 2013

Following is a typical recursive implementation of QuickSort for arrays. The implementation uses last element as pivot.

February 22, 2013

Given a linked list where in addition to the next pointer, each node has a child pointer, which may or may not point to a separate list. These child lists may have one or more children of their own, and so on, to produce a multilevel data structure, as shown in below figure.

December 11, 2012

Given a linked list of 0s, 1s and 2s, sort it. Source: Microsoft Interview | Set 1

October 20, 2012

Given two numbers represented by two linked lists, write a function that returns sum list. The sum list is linked list representation of addition of two input numbers.

September 29, 2012

Given a linked list where every node represents a linked list and contains two pointers of its type:

August 23, 2012

Given a singly linked list, rotate the linked list counter-clockwise by k nodes. Where k is a given positive integer.

August 4, 2012

Given three linked lists, say a, b and c, find one node from each list such that the sum of the values of the nodes is equal to a given number.

June 14, 2012

In the previous post, we discussed how a Doubly Linked can be created using only one space for address field with every node.