# Category Archives: Pattern Searching

Given two positive integers K and N, the task is to find the permutation present at the middle of all permutations of at most length… Read More
Given a string S consisting of lowercase characters and an integer K, the task is to find the maximum length of a subsequence consisting of… Read More
Given a string S consisting of N characters and positive integer K, the task is to check if there exist any (K + 1) strings… Read More
Given an array arr[] consisting of N integers, the task is to find the last remaining array element after removing every second element, starting from… Read More
Given a positive integer N, the task is to find the Nth term of the Ruler Function Series. The Ruler Function Series is a series,… Read More
Given three integers A, B, and C representing the coefficients of a quadratic equation Ax2 + Bx + C = 0, the task is to… Read More
Given a positive integer N, the task is to find the single digit obtained after recursively adding the digits of 2N until a single digit… Read More
Given an array arr[] consisting of N integers and two positive integers M and K, the task is to check if there exists any subarray… Read More
Given an array arr[] consisting of N positive integers, the task is to make all array elements equal by repeatedly subtracting 1 from any number… Read More
Given a matrix mat[][] of dimension N * M, the task is to count the minimum number of decrements of distinct array elements required such… Read More
Given two strings text and pattern of length M and N respectively, the task is to check if the pattern matches the text or not.… Read More
Given two positive integers N and K, the task is to check if the given integer N can be expressed as the product of K… Read More
Given a string S, the task is to find the minimum removal of characters required such that the string S consists only of two alternating… Read More
Given two integers L and R, the task is to find the number of unique triplets whose values lie in the range [L, R], such… Read More
Given two binary strings A and B of length N, the task is to convert the string A to B by repeatedly flipping a prefix… Read More