Skip to content

Category Archives: Advanced Data Structure

Given an array arr[] consisting of N integers and a positive integer K, the task is to find the number of subarrays of size K… Read More
There are some data structures that are supported by g++ compiler and are not a part of the C++ standard library. One of these is:… Read More
Given an array arr[] consisting of N strings and Q queries in form of two strings prefix and suffix, the task for each query is… Read More
The task is to design a general Hash Table data structure with Collision case handled and that supports the Insert(), Find(), and Delete() functions. Examples:… Read More
Given an array arr[] consisting of N distinct integers, the task is to count the number of triplets (i, j, k) possible from the array… Read More
The find_by_order() is a built-in function of Ordered Set which is a Policy Based Data Structure in C++. Policy-based data structures are not part of… Read More
Given an array arr[] consisting of N non-negative integers and a 2D array queries[][] consisting of queries of the type {X, M}, the task for… Read More
Given a string S of length N and a 2D array of strings Q[][] consisting of M queries of the following type: Query(“U”, “I”, “X”):… Read More
Given an Array arr[] of positive integers of size n. We are required to perform following 3 queries on given array – 1) Given L… Read More
Given a string S and an array of strings arr[] of length N and M respectively, the task is to find the string from the… Read More
Given an array arr[] consisting of N integers and a 2D array Q[][] consisting of queries of the following two types: 1 L R: Print… Read More
Given two arrays apples[] and days[] representing the count of apples an apple tree produces and the number of days these apples are edible from… Read More