# Category Archives: Pattern Searching

Given an integer N, the task is to find an N-digit number such that it is not divisible by any of its digits.Note: There can… Read More
Given a number N(≥ 8), the task is to print a Hollow Triangle inside a Triangle pattern.Example:   Input: N = 9 Output: * * *… Read More
Given an array arr of strings, the task is to remove the strings that are an anagram of an earlier string, then print the remaining… Read More
Given a number N, the task is to print the first N Stepping Numbers.  A number is called stepping number if all adjacent digits have… Read More
Given a string str and an integer K, the task is to check if it is made up of K alternating characters. Examples:  Input: str… Read More
Given a perfect square natural number N. The task is to find all the factors of N. Examples  Input: N = 100 Output: 1 2 4… Read More
Given string str. The task is to count the number of all different strings possible if two consecutive same characters of the string can be… Read More
Given a string str, the task is to find the longest palindromic string that can be obtained from it after removing a substring. Examples:  Input:… Read More
Given a string str consisting of lowercase characters, the task is to find the total number of unique substrings with non-repeating characters. Examples:  Input: str… Read More
Given a binary array arr[] of length N, the task is to find the minimum flips required in the array such that XOR of a… Read More
Given a binary tree, the task is to check whether the nodes in this tree form an arithmetic progression, geometric progression or harmonic progression.Examples:   Input:… Read More
Given a number N, the task is to construct a square matrix of N * N where the union of elements in some ith row… Read More
Given an array of strings arr[] and a string str, the task is to print all the strings from the array arr which follow the… Read More
Given binary string str of 0’s and 1’s only. The task is to count the total number of substrings of string str such that each… Read More
Given a number N, the task is to find the N numbers such that their sum is a perfect cube. Examples:   Input: N = 3 Output:… Read More