## K Dimensional Tree | Set 2 (Find Minimum)

We strongly recommend to refer below post as a prerequisite of this. K Dimensional Tree | Set 1 (Search and Insert) In this post find… Read More »

- Design a Chess Game
- Kth smallest element in a subarray
- Remove minimum elements from either side such that 2*min becomes more than max | Set 2
- Rearrange numbers in an array such that no two adjacent numbers are same
- Lazy Propagation in Segment Tree | Set 2
- Trie Data Structure using smart pointer and OOP in C++
- Range Queries to Find number of sub-arrays with a given xor
- Implement a Dictionary using Trie
- Given an array and two integers l and r, find the kth largest element in the range [l, r]
- Persistent Trie | Set 1 (Introduction)
- Longest string in an array which matches with prefix of the given string
- 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
- Flipping Sign Problem | Lazy Propagation Segment Tree
- Queries to update a given index and find gcd in range
- Count smaller elements on right side and greater elements on left side using Binary Index 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
- Find a pair from the given array with maximum nCr value
- Bottom-up traversal of a Trie
- B-Tree Insert without aggressive splitting
- Search in a trie Recursively
- Arrange array elements such that last digit of an element is equal to first digit of the next element
- Queries for number of distinct elements in a subarray | Set 2
- Strings from an array which are not prefix of any other string
- Index of kth set bit in a binary array with update queries
- Insertion in a Trie recursively
- B*-Trees implementation in C++

We strongly recommend to refer below post as a prerequisite of this. K Dimensional Tree | Set 1 (Search and Insert) In this post find… Read More »

Segment tree is introduced in previous post with an example of range sum problem. We have used the same “Sum of given Range” problem to… Read More »

How to design a system that takes big URLs like “https://www.geeksforgeeks.org/count-sum-of-digits-in-numbers-from-1-to-n/” and converts them into a short 6 character URL. It is given that URLs… Read More »

Design a data structure that supports the following operations in Θ(1) time. insert(x): Inserts an item x to the data structure if not already present.… Read More »

Unlike C++ and Java, C doesn’t support generics. How to create a linked list in C that can be used for any data type? In… Read More »

Given a string, find the longest substring which is palindrome. We have already discussed Naïve [O(n3)], quadratic [O(n2)] and linear [O(n)] approaches in Set 1,… Read More »

We have discussed implementation of Reverse DNS Look Up Cache. Forward DNS look up is getting IP address for a given domain name typed in… Read More »

Let us consider the following problem to understand Binary Indexed Tree. We have an array arr[0 . . . n-1]. We would like to 1… Read More »

Reverse DNS look up is using an internet IP address to find a domain name. For example, if you type 74.125.200.106 in browser, it automatically… Read More »

Given two strings X and Y, find the Longest Common Substring of X and Y. Naive [O(N*M2)] and Dynamic Programming [O(N*M)] approaches are already discussed… Read More »

In earlier suffix tree articles, we created suffix tree for one string and then we queried that tree for substring check, searching all patterns, longest… Read More »

Given a string, build it’s Suffix Array We have already discussed following two ways of building suffix array: Naive O(n2Logn) algorithm Enhanced O(nLogn) algorithm Please… Read More »

Given a text string, find Longest Repeated Substring in the text. If there are more than one Longest Repeated Substrings, get any one of them.… Read More »

Given a text string and a pattern string, find all occurrences of the pattern in string. Few pattern searching algorithms (KMP, Rabin-Karp, Naive Algorithm, Finite… Read More »

Given a text string and a pattern string, check if a pattern exists in text or not. Few pattern searching algorithms (KMP, Rabin-Karp, Naive Algorithm,… Read More »