## Flatten a binary tree into linked list | Set-2

Given a binary tree, flatten it into a linked list. After flattening, the left of each node should point to NULL and right should contain… Read More »

- Design a Chess Game
- Kth smallest element in a subarray
- Rearrange numbers in an array such that no two adjacent numbers are same
- Implement a Dictionary using Trie
- Trie Data Structure using smart pointer and OOP in C++
- Lazy Propagation in Segment Tree | Set 2
- Range Queries to Find number of sub-arrays with a given xor
- 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
- 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
- Count smaller elements on right side and greater elements on left side using Binary Index Tree
- Introduction to R-tree
- Queries for number of distinct elements in a subarray | Set 2
- Queries to update a given index and find gcd in range
- Flipping Sign Problem | Lazy Propagation Segment Tree
- Gap Buffer Data Structure
- Search in a trie Recursively
- Find triplet such that number of nodes connecting these triplets is maximum
- Bottom-up traversal of a Trie
- Extendible Hashing (Dynamic approach to DBMS)
- 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
- Insertion in a Trie recursively
- B-Tree Insert without aggressive splitting
- Strings from an array which are not prefix of any other string
- Van Emde Boas Tree | Set 1 | Basics and Construction
- Arrange array elements such that last digit of an element is equal to first digit of the next element
- B*-Trees implementation in C++

Given a binary tree, flatten it into a linked list. After flattening, the left of each node should point to NULL and right should contain… Read More »

Given an array arr[0 . . . n-1]. The task is to perform the following operation: Find the maximum of elements from index l to… Read More »

Given a graph, the task is to print the DFS traversal of a graph which includes the every step including the backtracking. 1st step:- 0… Read More »

Given an array of N positive integers. The task is to perform the following operations according to the type of query given. 1. Print the… Read More »

Prerequisites: Fenwick Tree (Binary Indexed Tree) Given an array of N numbers, and a number of queries where each query will contain three numbers(l, r… Read More »

We have discussed recursive segment tree implementation. In this post, iterative implementation is discussed. Let us consider the following problem understand Segment Trees. We have… Read More »

Given an array of n distinct integers and an integer k. Find out the number of sub-sequences of a such that , and . In… Read More »

Given a binary tree and 3 nodes a, b and c, the task is to find a node in the tree such that after removing… Read More »

Given a BST, the task is to find the sum of all elements greater than or equal to K-th largest element in O(1) space. Examples:… Read More »

Given a string array of M words and a dictionary of N words. The task is to check if the given string of words can… Read More »

sklearn.preprocessing.Binarizer() is a method which belongs to preprocessing module. It plays a key role in the discretization of continuous feature values. Example #1: A continuous… Read More »

Given an array of n elements and q range queries (range sum in this article) with no updates, task is to answer these queries with… Read More »

Prerequisite – Hashing Introduction, Hashtable using Singly Linked List & Implementing our Own Hash Table with Separate Chaining in Java Implementing hash table using Chaining… Read More »

Coalesced hashing is a collision avoidance technique when there is a fixed sized data. It is a combination of both Separate chaining and Open addressing.… Read More »

Given an array of N numbers and Q queries, each query consists of L and R. We need to write a program that prints the… Read More »