Skip to content

Category Archives: Searching

Given a string str and an integer K, the task is to check if a permutation of the given string can be made a palindromic… Read More
Given an array arr[] of size N, the task is to count the maximum number of elements that can be removed from the given array… Read More
Given a string, str, the task is to find the indices of the given string such that the count of lexicographically smaller characters on the… Read More
Given an array arr[] consisting of N distinct positive integers, the task is to print the first K distinct Moran Numbers from the given array.… Read More
Given an integer X, the task is to count the total number of three-digit numbers having difference X with its reverse. If no such number… Read More
Given a 2D array arr[] consisting of N coordinates of the form (X, Y), the task is to find a coordinate from the given array… Read More
Given a sorted array arr[] consisting of N distinct integers and an integer K, the task is to find the index of K, if it’s… Read More
Prerequisite: Searching and Sorting Algorithms Searching Algorithms are designed to check for an element or retrieve an element from any data structure where it is… Read More
Given a 2D array, board[][] of size 9 × 9, which represents a solution to the Sudoku puzzle, the task is to check if the… Read More
Given a string S, the task is to find the length of the longest substring between any pair of occurrences of same character. Examples: Input:… Read More
Given an array arr[] consisting of N integers, the task is to create an array brr[] of size N where brr[i] represents the count of… Read More
Given two integers L and R, the task is to count the number of full prime numbers that are present in the given range. A… Read More
Given a sorted array arr[] of size N and an array Q[][] having queries in the form of {x, y}. In each query {x, y},… Read More
Given an array, arr[] of size N, the task is to print the elements of the given array present at odd indices (1-based indexing). Examples:… Read More
Given a Binary Tree, the task is to count the number of nodes in the given Binary Tree such that the path from the root… Read More