## Extract Leaves of a Binary Tree in a Doubly Linked List

Given a Binary Tree, extract all leaves of it in a Doubly Linked List (DLL). Note that the DLL need to be created in-place. Assume… Read More »

## Convert a given Binary Tree to Doubly Linked List | Set 2

Given a Binary Tree (BT), convert it to a Doubly Linked List(DLL). The left and right pointers in nodes are to be used as previous… Read More »

## QuickSort on Doubly Linked List

Following is a typical recursive implementation of QuickSort for arrays. The implementation uses last element as pivot. filter_none edit close play_arrow link brightness_4 code /*… Read More »

## Convert a given Binary Tree to Doubly Linked List | Set 1

Given a Binary Tree (Bt), convert it to a Doubly Linked List(DLL). The left and right pointers in nodes are to be used as previous… Read More »

## Design an efficient data structure for given operations

Design a Data Structure for the following operations. The data structure should be efficient enough to accommodate the operations according to their frequency. 1) findMin()… Read More »

## XOR Linked List – A Memory Efficient Doubly Linked List | Set 2

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

## Merge Two Balanced Binary Search Trees

You are given two balanced binary search trees e.g., AVL or Red Black Tree. Write a function that merges the two given balanced BSTs into… Read More »

## In-place conversion of Sorted DLL to Balanced BST

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 »

## XOR Linked List – A Memory Efficient Doubly Linked List | Set 1

An ordinary Doubly Linked List requires space for two address fields to store the addresses of previous and next nodes. A memory efficient version of… Read More »

## Delete a node in a Doubly Linked List

Doubly Link List Set 1| Introduction and Insertion Write a function to delete a given node in a doubly linked list. (a) Original Doubly Linked… Read More »

## Reverse a Doubly Linked List

Write a C function to reverse a given Doubly Linked List See below diagrams for example. (a) Original Doubly Linked List (b) Reversed Doubly Linked… Read More »

## Memory efficient doubly linked list

Asked by Varun Bhatia. Question: Write a code for implementation of doubly linked list with use of single pointer in each node. Solution: This question… Read More »

## The Great Tree-List Recursion Problem.

Asked by Varun Bhatia. Question: Write a recursive function treeToList(Node root) that takes an ordered binary tree and rearranges the internal pointers to make a… Read More »