## Palindromic Tree | Introduction & Implementation

We encounter various problems like Maximum length palindrome in a string, number of palindromic substrings and many more interesting problems on palindromic substrings . Mostly… Read More »

- Design a Chess Game
- Remove minimum elements from either side such that 2*min becomes more than max | Set 2
- Kth smallest element in a subarray
- Lazy Propagation in Segment Tree | Set 2
- Rearrange numbers in an array such that no two adjacent numbers are same
- Range Queries to Find number of sub-arrays with a given xor
- Trie Data Structure using smart pointer and OOP in C++
- Given an array and two integers l and r, find the kth largest element in the range [l, r]
- Longest string in an array which matches with prefix of the given string
- Implement a Dictionary using Trie
- Persistent Trie | Set 1 (Introduction)
- Count of strings whose prefix match with the given string to a given length k
- Sort an array of strings based on the frequency of good words in them
- Introduction to R-tree
- Queries to update a given index and find gcd in range
- Flipping Sign Problem | Lazy Propagation Segment Tree
- Find triplet such that number of nodes connecting these triplets is maximum
- Find the number of different numbers in the array after applying the given operation q times
- Gap Buffer Data Structure
- Count smaller elements on right side and greater elements on left side using Binary Index Tree
- Find a pair from the given array with maximum nCr value
- Bottom-up traversal of a Trie
- B-Tree Insert without aggressive splitting
- 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
- Strings from an array which are not prefix of any other string
- Search in a trie Recursively
- Insertion in a Trie recursively
- B*-Trees implementation in C++
- Proto Van Emde Boas Tree | Set 2 | Construction

We encounter various problems like Maximum length palindrome in a string, number of palindromic substrings and many more interesting problems on palindromic substrings . Mostly… Read More »

Given a dictionary find out if given word can be made by two words in the dictionary. Note: Words in the dictionary must be unique… Read More »

Given a list of words, find if any of the two words can be joined to form a palindrome. Examples: Input : list[] = {“geekf”,… Read More »

Given a dictionary and a character array, print all valid words that are possible using characters from the array. Examples: Input : Dict – {“go”,”bat”,”me”,”eat”,”goal”,… Read More »

We have seen various methods with different Time Complexities to calculate LCA in n-ary tree:- Method 1 : Naive Method ( by calculating root to… Read More »

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 »

Given a dictionary, a method to do a lookup in the dictionary and a M x N board where every cell has one character. Find… Read More »

Prerequisite : Segment Tree Persistency in Data Structure Segment Tree is itself a great data structure that comes into play in many cases. In this… Read More »

Prerequisite : Introduction and DFS The task is to find LCA of two given nodes in a tree (not necessarily a Binary Tree). In previous… Read More »

Given a string S, and two type of queries. Type 1: 1 L x, Indicates update Lth index of string S by x character. Type… Read More »

Given n strings and a weight associated with each string. The task is to find the maximum weight of string having the given prefix. Print… Read More »

In previous posts, we have discussed how to calculate the Lowest Common Ancestor (LCA) for a binary tree and a binary search tree (this, this… Read More »

Given a Binary Matrix. The task is to find the pair of row in the Binary matrix that has maximum bit difference Examples: Input: mat[][]… Read More »

Given a string of length n of lowercase alphabet characters, we need to count total number of distinct substrings of this string. Examples: Input :… Read More »

Given a matrix A of size NxN, we need to find the number of inversion pairs in it. Inversion count in a matrix is defined… Read More »