Skip to content

Category Archives: Data Structures

Given an array A[] of N elements, the task is to create a Prefix-MEX array for this given array. Prefix-MEX array B[] of an array… Read More
Given a binary string S, the task is to find the longest subsequence with that has equal number of 0s and 1s and all the… Read More
Stack is a linear data structure that follows the LIFO (last in first out) order i.e., the data are entered from one end and while… Read More
What are Ropes? Rope is a binary tree data structure where each node except the leaf contains the number of characters present to the left… Read More
Hashing refers to the process of generating a fixed-size output from an input of variable size using the mathematical formulas known as hash functions. This… Read More
Given an array of jumps[] of length N, where each element denotes the maximum length of a jump forward from each index. The task is… Read More
Prerequisite: NP-Completeness, NP Class, Sparse Graph, Independent Set Problem: Given graph G = (V, E) and two integers a and b. A set of a… Read More
Given an array arr[] of length N, The task is to find the maximum and the minimum number in the array. Examples: Input: arr[] =… Read More
Brute Force: It gives a solution to a problem by using the most straightforward method. However, it is typically not a very optimal solution or… Read More
What is a Perfect Binary Tree? A perfect Binary Tree is a binary tree in which each of the internal nodes has exactly two child… Read More
Given N pairs of integers, each integer is between 1 to M, the task is to check if there exist two integers x and y… Read More
A Stack is a temporary memory address space that is used to hold arguments and automatic variables during the invocation of a subprogram or function… Read More
Prefix Notation: Prefix notation is the notation in which operators are placed before the corresponding operands in the expression. Example:  Infix notation: A + B… Read More
Is string a keyword? A string is NOT a keyword. It is one of the names of data types declared in the standard library.  How… Read More
Given two arrays arr1[] and arr2[] of length N each and an integer K, The task is to maximize the number of equal elements at… Read More

Start Your Coding Journey Now!