Given two positive integers N and K, the task is to find the Kth character of a string obtained by performing the following operation on… Read More

# Category Archives: Searching

Given an integer N, the task is to check if any permutation of N without any leading zeros is a power of 2. If any… Read More

Given an integer N, the task is to find the total number of right angled triangles that can be formed such that the length of… Read More

Given two matrices mat1[][] and mat2[][] of size NxN. The task is to find if the given two matrices are mirror images of one another.… Read More

What is the binary search algorithm? Binary Search Algorithm is used to find a certain value of x for which a certain defined function f(x) needs… Read More

Given a Binary Tree, the task is to find the length of the longest straight path of the given binary tree. Straight Path is defined… Read More

Given an N-ary Tree having N nodes with positive and negative values and (N – 1) edges, the task is to find the maximum absolute… Read More

Given two arrays arr1[] and arr2[] of length N and M respectively, the task is to find the length of the longest common prime subsequence… Read More

Given string str of lowercase alphabets and an array cost[], where cost[i] represents the cost of deletion of ith character in the given string. The… Read More

Given binary string str, the task is to count the total number of ways to split the given string into three non-overlapping substrings having the… Read More

Given a connected acyclic graph consisting of V vertices and E edges, a source vertex src, and a destination vertex dest, the task is to… Read More

Given an array arr[] of N integers along with integers M, L, R. Consider a variable S(initially 0). The task is to find the maximum… Read More

Given a string S of size N consisting of lowercase alphabets only, the task is to find the smallest character having a minimum sum of… Read More