## Dynamic Programming on Trees | Set 2

Given a tree with N nodes and N-1 edges, find out the maximum height of tree when any node in the tree is considered as… Read More »

- Design a Chess Game
- Kth smallest element in a subarray
- Implement a Dictionary using Trie
- Rearrange numbers in an array such that no two adjacent numbers are same
- Trie Data Structure using smart pointer and OOP in C++
- Persistent Trie | Set 1 (Introduction)
- Count smaller elements on right side and greater elements on left side using Binary Index Tree
- Longest string in an array which matches with prefix of the given string
- Sort an array of strings based on the frequency of good words in them
- Count of strings whose prefix match with the given string to a given length k
- Queries for number of distinct elements in a subarray | Set 2
- Introduction to R-tree
- Queries to update a given index and find gcd in range
- Flipping Sign Problem | Lazy Propagation Segment Tree
- Search in a trie Recursively
- Extendible Hashing (Dynamic approach to DBMS)
- Bottom-up traversal of a Trie
- Gap Buffer Data Structure
- Find the number of different numbers in the array after applying the given operation q times
- String Range Queries to find the number of subsets equal to a given String
- Count inversions in an array | Set 4 ( Using Trie )
- B-Tree Insert without aggressive splitting
- Insertion in a Trie recursively
- B*-Trees implementation in C++
- Van Emde Boas Tree | Set 1 | Basics and Construction
- Strings from an array which are not prefix of any other string
- Shortest cycle in an undirected unweighted graph
- Maximise the number of toys that can be purchased with amount K using min Heap
- Arrange array elements such that last digit of an element is equal to first digit of the next element
- Index of kth set bit in a binary array with update queries

Given a tree with N nodes and N-1 edges, find out the maximum height of tree when any node in the tree is considered as… Read More »

An unrolled linked list is a linked list of small arrays, all of the same size where each is so small that the insertion or… Read More »

Dynamic Programming(DP) is a technique to solve problems by breaking them down into overlapping sub-problems which follows the optimal substructure. There are various problems using… Read More »

Prerequisite: Basic Dynamic Programming, Bitmasks Consider the following problem where we will use Sum over subset Dynamic Programming to solve it. Given an array of… Read More »

In previous post i.e. Set 1 we have discussed that implements these below functions: insert(H, k): Inserts a key ‘k’ to Binomial Heap ‘H’. This… Read More »

Artificial intelligence is defined as a study of rational agents. A rational agent could be anything which makes decisions, as a person, firm, machine, or… Read More »

Let us consider the following problem to understand Segment Trees. We have an array arr[0 . . . n-1]. We should be able to 1… Read More »

Consider an array A[] of integers and following two types of queries. update(l, r, x) : Adds x to all values from A[l] to A[r]… Read More »

Dope Vectors is a data structure that is used by compilers to store some metadata about the array like its total size, the size of… Read More »

Tries is a tree that stores strings. Maximum number of children of a node is equal to size of alphabet. Trie supports search, insert and… Read More »

Given an array of size n. Find the maximum sum an increasing subsequence. Examples: Input : arr[] = { 1, 20, 4, 2, 5 }… Read More »

The current article would deal with the concepts surrounding the complex networks using the python library Networkx. It is a Python language software package for… Read More »

Pre-requisite: Suffix Array. What are k-mers? The term k-mer typically refers to all the possible substrings of length k that are contained in a string.… Read More »

Tango Tree is an online algorithm. It is a type of binary search tree. It is better than the offline weight balanced binary search tree… Read More »

Self Organizing list is a list that re-organizes or re-arranges itself for better performance. In a simple list, an item to be searched is looked… Read More »