# Category Archives: Advanced Data Structure

## Difference between B tree and B+ tree

B-Tree: B-Tree is known as a self-balancing tree as its nodes are sorted in the inorder traversal. In B-tree, a node can have more than… Read More »

## Difference between Backtracking and Branch-N-Bound technique

Algorithms are the methodical sequence of steps which are defined to solve complex problems. In this article, we will see the difference between two such… Read More »

## Check if product of Array elements in given range are M-th root or not

Content has been removed on Author’s request. My Personal Notes arrow_drop_up Save

## Proof that Dominant Set of a Graph is NP-Complete

Pre-requisite: Dominant Set of a Graph, NP-Complete A dominating set in a graph G = (V, E) is a subset of vertices V’ following the… Read More »

## Count of distinct colors in a subtree of a Colored Tree with given min frequency for Q queries

Given a N-ary tree with some colour associated with every node and Q queries. Each query contains two integers A and X. The task is… Read More »

## Proof that traveling salesman problem is NP Hard

Pre-requisite: Travelling Salesman Problem, NP Hard Given a set of cities and the distance between each pair of cities, the travelling salesman problem finds the… Read More »

## XOR of elements in a given range with updates using Fenwick Tree

Given an array A[] of integers and array Q consisting of queries of the following two types: (1, L, R) : Return XOR of all… Read More »

## Paranthesis Theorem

Parenthesis Theorem is used in DFS of graph. It states that the descendants in a depth-first-search tree have an interesting property. If v is a… Read More »

## Find K-th smallest element in an array for multiple queries

Given an array arr[] of size N and an array Q[][] consisting of M queries that needs to be processed on the given array. It… Read More »

## Minimum Bottleneck Spanning Tree(MBST)

The minimum bottleneck spanning tree in an undirected graph is a tree whose most expensive edge is as minimum as possible. In this article, we… Read More »

## Array Range Queries to find the Maximum Armstrong number with updates

Given an array arr[] of N integers, the task is to perform the following two queries:  maximum(start, end): Print the maximum Armstrong number of elements… Read More »

## Array range queries to find the number of perfect square elements with updates

Given an array arr[] of N integers, the task is to perform the following two queries:  query(start, end): Print the number of perfect square numbers… Read More »

## Query to find the maximum and minimum weight between two nodes in the given tree using LCA.

Given a tree, and the weights of all the node. Each query contains two integers u and v, the task is to find the minimum… Read More »

## Sum and Maximum of elements in array from [L, R] before and after updates

Prerequisite: Segment Trees, Lazy Propagation in Segment Tree. Given an array arr[] of N integers. The task is to do the following operations: Change the… Read More »

## Find minimum y coordinates from set of N lines in a plane

Given N lines in a plane in the form of a 2D array arr[][] such that each row consists of 2 integers(say m & c)… Read More »