Given two strings S1 and S2 of length N and M respectively, the task is to find the maximum value of times the string S2… Read More

# Category Archives: Pattern Searching

Given two strings S and T of length N and M respectively, the task is to count the number of substrings of S that contains… Read More

Given a Binary string str of length N, the task is to find the last character removed from the string by repeatedly removing the first… Read More

Given a matrix with N rows and M columns, the task is to find the minimum replacements requried to make all rows and columns of… Read More

Given an array arr[] consisting of N integers and an integer K, the task is to find the number of times the absolute difference between… Read More

Given three integers N, low and high, the task is to find the lexicographically largest bitonic sequence consisting of N elements lying in the range… Read More

Given a positive integer N, the task is to generate two arrays of length N such that the same-indexed elements of both the arrays are… Read More

Given an array arr[] of length N, the task is to find the count of array indices such that removing an element from these indices… Read More

There are two players A and B and a pile of N cards stacked upon each other. The task is to find the winner of… Read More

Given a vectors of vectors arr[], the task is to print the elements of arr[] in the diagonally upwards order as illustrated below. Examples: Input:… Read More

This article explains a program in python 2.7 to solve a Sudoku 9×9 of the Android application “Sudoku” of genina.com. To solve a sudoku of… Read More

Given two positive integers A and B, the task is to flip the common set bitsin A and B. Examples: Input: A = 7, B… Read More

Given a string S of length L, where L is a perfect square, the task is to check if the given string satisfies the following… Read More

Given a string S and two positive integers X and Y, the task is to find the minimum number of operations required to obtain the… Read More