## Sort an array of strings based on the frequency of good words in them

Given a set of product reviews (R) by different customers and a string S containing good words separated by a _, the task is to… Read More »

## Check if the given Trie contains words starting from every alphabet

Given a Trie, the task is to check if it contains words starting from every alphabet from [a – z]. Examples: Input: keys[] = {“element”,… Read More »

## Design a Chess Game

Problem Statement: The problem is to design a Chess Game using Object Oriented Principles. Asked In: Adobe, Amazon, Microsoft, etc. Solution: These type of questions… Read More »

## Flipping Sign Problem | Lazy Propagation Segment Tree

Given an array of size N.There can be multiple queries of the following types. update(l, r) : On update, flip( multiply a[i] by -1) the… Read More »

## Gap Buffer Data Structure

Gap Buffer is a data structure used for editing and storing text in an efficient manner that is being currently edited. It is also similar… Read More »

## Rearrange numbers in an array such that no two adjacent numbers are same

Given an array of integers. The task is to rearrange elements of the array such that no two adjacent elements in the array are same.… Read More »

## Longest string in an array which matches with prefix of the given string

Given an array of strings arr[] and Q queries where each each query consists of a string str, the task is to find the longest… Read More »

## Find the number of different numbers in the array after applying the given operation q times

Given an array of size N, initially consists of zeroes only. The task is to apply given operation q times and find the number of… Read More »

## Persistent Trie | Set 1 (Introduction)

Prerequisite: Trie Persistency in Data Structure Trie is one handy data structure that often comes into play when performing multiple string lookups. In this post,… Read More »

## B-Tree Insert without aggressive splitting

B-Tree Insert without aggressive splitting This algorithm for insertion takes an entry, finds the leaf node where it belongs, and inserts it there. We recursively… Read More »

## Index of kth set bit in a binary array with update queries

Given a binary array arr[] and q queries of following types: k: find the index of the kth set bit i.e. kth 1 in the… Read More »

## Arrange array elements such that last digit of an element is equal to first digit of the next element

Given an array arr[] of integers, the task is to arrange the array elements such that the last digit of an element is equal to… Read More »

## Count of strings whose prefix match with the given string to a given length k

Given an array of strings arr[] and given some queries where each query consists of a string str and an integer k. The task is… Read More »

## Queries to update a given index and find gcd in range

Given an array arr[] of N integers and queries Q. Queries are of two types: Update a given index ind by X. Find the gcd… Read More »

## Introduction to R-tree

R-tree is a tree data structure used for storing spatial data indexes in an efficient manner. R-trees are highly useful for spatial data queries and… Read More »