This category is for logical grouping only. It needn’t to be added directly. Instead, the sub-categories should be added.

## Query to check if a range is made up of consecutive elements

Given an array of n non-consecutive integers and Q queries, the task is to check whether for the given range l and r, the elements… Read More »

## Check if a word is present in a sentence

Given a sentence as a string str and a word word, the task is to check if the word is present in str or not.… Read More »

## Height of Pyramid formed with given Rectangular Box

Given an array of rectangular blocks with dimensions {l, b} of length m. we can shape each of rectangular blocks into a single square block… Read More »

## Make all the array elements odd with minimum operations of given type

Given an array arr[] consisting of even integers. At each move, you can select any even number X from the array and divide all the… Read More »

## Count number of increasing sub-sequences : O(NlogN)

Given an array arr[] of length N, the task is to find the number of strictly increasing sub-sequences in the given array. Examples: Input: arr[]… Read More »

## Construct XOR tree by Given leaf nodes of Perfect Binary Tree

Given the leaf nodes of a perfect binary tree, the task is to construct the XOR tree and print the root node of this tree.… Read More »

## Median of sliding window in an array

Given an array of integer arr[] and an integer k, the task is to find the median of each window of size k starting from… Read More »

## Minimum number of swaps to make two binary string equal

Given two binary strings of equal length, the task is to find the minimum number of swaps to make them equal. Swapping between two characters… Read More »

## Construct Binary Tree from Ancestor Matrix | Top Down Approach

Given an ancestor matrix mat[n][n] where the ancestor matrix is defined as below. mat[i][j] = 1 if i is ancestor of j mat[i][j] = 0,… Read More »

## Print left and right leaf nodes separately in Binary Tree

Given a binary tree, the task is to print left and right leaf nodes separately. Examples: Input: 0 / \ 1 2 / \ 3… Read More »

## Print characters and their frequencies in order of occurrence using Binary Tree

Given a string str containing only lowercase characters. The problem is to print the characters along with their frequency in the order of their occurrence… Read More »

## Find Maximum Length Of A Square Submatrix Having Sum Of Elements At-Most K

Given a N x M matrix where N is the number of rows and M is the number of columns in the given matrix and… Read More »

## Find the resultant String after replacing X with Y and removing Z

Given a string str, the task is to replace all occurrences of the given X with given Y and also remove any occurrances of the… Read More »

## Find Number of Even cells in a Zero Matrix after Q queries

Given a Zero matrix of N x N size, the task is to find the numbers of cells containing even numbers after performing Q queries.… Read More »

## Check if all bits can be made same by flipping two consecutive bits

Given a binary string, the task is to find whether all the digits of the string can be made equal i.e either 0 or 1… Read More »