Given a string S consisting of N unique lowercase alphabets and an array arr[] of length N where character S[i] represents the bulb and arr[i]… Read More

# Category Archives: Searching

Given two arrays A[], consisting of N integers, and B[], consisting of taste values of M chocolates and an integer X, the task is to… Read More

Given an array arr[] of size N, the task is to find the maximum frequency of any array element by incrementing or decrementing each array… Read More

Given an array arr[] consisting of N positive integers, the task is to find the length of the longest increasing subsequence possible by selecting elements… Read More

Given a vector of pairs arr[] and Q queries in the form of pairs in an array Queries[], the task for each query is to… Read More

Given an array arr[] of size N, the task is to find the minimum number of array elements required to be removed from the array… Read More

Given an array arr[] consisting of N positive integers, the task is to minimize the remaining array element that can be obtained by repeatedly removing… Read More

Given two strings str1 and str2, the task is to count the maximum consecutive occurrences of the string str2 in the string str1. Examples: Input:… Read More

Given an array, arr[] of size N whose elements from left to right, must be read as an incoming stream of integers, the task is… Read More

Given a string str, the task is to find the maximum count of common non-repeating characters that can be obtained by partitioning the given string… Read More

Given a binary string S of length N, the task is to find the longest substring consisting of ‘1’s only present in the string after… Read More

Given a string S and a character C, the task is to place a character in the string in such a way that the string… Read More

Given two strings a and b of the same length, the task is to check if splitting both the strings and concatenating their opposite substrings,… Read More