Given an array arr[] of N elements and an integer K, the task is to perform at most K operation on the array. In the… Read More

# Category Archives: Searching

Given an array arr[] of size N, the task is to split the array into a minimum number of subset such that each pair of… Read More

Given two strings str1 and str2, the task is to check if it is possible to form a Palindromic String by concatenation of two substrings… Read More

Given non-negative integers K, M, and an array arr[] with N elements find the Mth element of the array after K left rotations. Examples: Input:… Read More

Given an integer K and a matrix of size N x M, where each matrix element is equal to the product of its indices(i *… Read More

Given two integers N and K, the task is to find K pair of factors of the number N such that the GCD of each… Read More

Given a Directed graph of N vertices and M edges, the task is to find the minimum number of edges required to make the given… Read More

Given a binary string S and an integer K, the task is to find the minimum number of flips required to convert the given string… Read More

Given an array arr[] consisting of N integers, the task is to find the second largest element in the given array using N+log2(N) – 2… Read More

Given a string S, the task is to count the number of Reverse Bitonic Substrings in the given string. Reverse bitonic substring: A string in… Read More

Given a string S and a character C, the task is to count the number of substrings of S that contains only the character C.Examples: … Read More

Given a string str, the task is to check whether the given string can be split into two halves, each of which is palindromic. If… Read More

Given an array arr[], the task is to fnd the sum of a subsequence which forms a perfect square. If there are multiple subsequences having… Read More