##
Sort a linked list of 0s, 1s and 2s
December 11, 2012

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

Quick Links for Linked List

Quizzes |

Videos on Linked List |

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… Read More »

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… Read More »

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.

April 1, 2012

Given two Linked Lists, create union and intersection lists that contain union and intersection of the elements present in the given lists. Order of elments… Read More »

February 3, 2012

Given a Doubly Linked List which has data members sorted in ascending order. Construct a Balanced Binary Search Tree which has same data members as… Read More »

January 17, 2012

Given a Singly Linked List which has data members sorted in ascending order. Construct a Balanced Binary Search Tree which has same data members as… Read More »

November 26, 2011

Given a Singly Linked List, write a function to delete a given node. Your function must follow following constraints:

November 25, 2011

Consider simple representation (without any dummy node) of Linked List. Functions that operate on such Linked lists can be divided in two categories:

November 9, 2011

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

May 23, 2011

An ordinary Doubly Linked List requires space for two address fields to store the addresses of previous and next nodes.

May 9, 2011

Write a function detectAndRemoveLoop() that checks whether a given Linked List contains loop and if loop is present then removes the loop and returns true.

April 22, 2011

Given a Linked List of integers, write a function to modify the linked list such that all even numbers appear before all the odd numbers… Read More »