##
Left Leaning Red Black Tree (Insertion)
October 24, 2017

Prerequisites : Red – Black Trees. A left leaning Red Black Tree or (LLRB), is a variant of red black tree, which is a lot… Read More »

October 24, 2017

Prerequisites : Red – Black Trees. A left leaning Red Black Tree or (LLRB), is a variant of red black tree, which is a lot… Read More »

October 6, 2017

You are given an array of n integer and an integer K. Find the number of total unordered pairs {i, j} such that absolute value… Read More »

March 12, 2017

Given two sorted arrays, we can get a set of sums(add one element from the first and one from second). Find the N’th element in… Read More »

March 2, 2017

Given an array of n elements and an integer m. The task is to find the maximum value of the sum of its subarray modulo… Read More »

February 13, 2017

A ScapeGoat tree is a self-balancing Binary Search Tree like AVL Tree, Red-Black Tree, Splay Tree, ..etc. Search time is O(Log n) in worst case.… Read More »

December 22, 2016

Given an array of n distinct elements and a number x, arrange array elements according to the absolute difference with x, i. e., element having… Read More »

December 17, 2016

Given an array of distinct positive integers, the task is to find the maximum product of increasing subsequence of size 3, i.e., we need to… Read More »

October 19, 2016

Tree sort is a sorting algorithm that is based on Binary Search Tree data structure. It first creates a binary search tree from the elements… Read More »

October 10, 2016

Let us consider the below problem statement and think of different solutions for it. Given a set S of elements such that the elements are… Read More »

February 8, 2016

We have discussed Overview of Array, Linked List, Queue and Stack. In this article following Data Structures are discussed. 5. Binary Tree 6. Binary Search… Read More »

October 22, 2015

Like Red-Black and AVL Trees, Treap is a Balanced Binary Search Tree, but not guaranteed to have height as O(Log n). The idea is to… Read More »

September 7, 2015

A typical Priority Queue requires following operations to be efficient. Get Top Priority Element (Get minimum or maximum) Insert an element Remove top priority element… Read More »

July 10, 2015

Consider a big array where elements are from a small set and in any range, i.e. there are many repetitions. How to efficiently sort the… Read More »

May 11, 2015

In a Binary Search Tree (BST), all keys in left subtree of a key must be smaller and all keys in right subtree must be… Read More »

April 1, 2015

Hash Table supports following operations in Θ(1) time.