Skip to content

Category Archives: Pattern Searching

Given a string S. Find the longest Substring that starts with character C1, ends with character C3 and has at least one character C2 in… Read More
Given two circular linked lists L1 and L2, the task is to find if the two circular linked lists are identical or not.  Note: Head… Read More
Given strings s1 and s2 consisting of ‘A’, ‘B’ and ‘#’, where:  ‘#’ represents an empty cell ‘A’ represents robots that can move in the… Read More
Given two values M and N, fill a matrix of size ‘M*N’ in a spiral (or circular) fashion (clockwise) with given array elements. Examples:  … Read More
Given two integers N and K, the task is to construct an array of length N containing exactly K elements divisible by their positions. Examples:… Read More
Given a string S of length N. The string consists only of letters ‘F’ and ‘B’. The task is to generate a sequence performing some… Read More
Given a sentence S and a string B having distinct characters, find a string by joining the words of S according to given conditions:- Choose… Read More
Given an array arr of integers of size N, the task is to find a subsequence in which upon reversing the order, the maximum sum… Read More
Over the network, messages are sent as data packets. Each data packet is a series of bytes (8bits = 1 byte). The task is to… Read More
Given an array of string arr[] and a string str, the task is to print all the strings in arr[] that occur as a substring… Read More
Given integers N and K, the task is to find the maximum possible number an N length sequence of distinct positive integers can have if… Read More
Given a matrix mat[][] having N rows and M columns, the task is to find the minimum distance between two adjacent rows where the distance… Read More
Given two strings A and B, the task is to find the smallest substring of A having B as a subsequence. If there are multiple… Read More
Given a range [L, R), the task is to count the numbers that remain unchanged when rotated 180 degrees clockwise. Examples: Input: L = 0,… Read More
Given a positive integer N, the task is to find the sum upto Nth term of the series:  33 – 23, 53 – 43, 73… Read More

Start Your Coding Journey Now!