Skip to content

Category Archives: Data Structures

Given two strings S1 and S2 of the same length containing characters ranging from ‘0’ to ‘9’, the task is to return the minimum number… Read More
Given a binary tree and an integer K, the task is to write a program to count the number of nodes such that the path… Read More
Given a binary string consisting of ‘0’ and ‘1’ only and an integer K, the task is to minimize the string as far as possible… Read More
What is Segment Tree? A Segment Tree is a data structure that stores information about a range of elements in its nodes. It also allows… Read More
Priority Queue: A priority queue is a special type of queue in which each element is assigned a priority value. And elements are served based… Read More
Given a binary tree and a node start that is initially infected. For every second, neighbours of an infected node get infected. The task is… Read More
Given a 2D array arr[][] of size N * M, the value in arr[][] represents the value of coins, the task is to maximize the… Read More
Given a binary string S of size N, the task is to find the minimum number of removal required either from the start or end… Read More
Given a 2D array arr[] and value K, where each list in arr[] represents a point on Cartesian coordinates, the task is to group the… Read More
Given N nodes, where each of them is numbered from 0 to N – 1, and array edges, where there is a directed edge from… Read More
Trie data structure is defined as a Tree based data structure that is used for storing some collection of strings and performing efficient search operations… Read More
Given an array of strings arr[] of length N, the task is to sort the strings in Lexicographical order. Examples: Input: arr[] = {“batman”, “bat”,… Read More
Given an array A[] of size N, the task is to find the total number of positions in all the subarrays such that the value… Read More
Given an array arr[] of size N that contains -1 and all positive integers, the task is to modify the array and print the final… Read More
Given an array of positive integers arr[] of length N and a query array query[] of length M, the task is to find the maximum… Read More

Start Your Coding Journey Now!