# Category Archives: Searching

Given a string S of length N, the task is to count the number of substrings made up of a single distinct character.Note: For theâ€¦ Read More
Given an array arr[] of size N, consisting of binary values, the task is to find the longest non-empty subarray consisting only of 1s afterâ€¦ Read More
GUI(Graphical User Interface) helps in better understanding than programs. In this article, we will visualize Binary Search using JavaScript. We will see how the elementsâ€¦ Read More
GUI(Graphical User Interface) helps in better in understanding than programs. In this article, we will visualize Linear Search using JavaScript. We will see how theâ€¦ Read More
Given an array arr[] consisting of N integers, the task is to find the length of the longest non-decreasing subsequence such that the difference betweenâ€¦ Read More
Given an array, arr[] consisting of N integers, the task is to minimize the number of increments of array elements required to make all differencesâ€¦ Read More
Given two integers N and K, the task is to print all the numbers from the range [1, N] whose product of digits is equalâ€¦ Read More
Given an array arr[] consisting of N positive integers, the task is to find the minimum number of increments required to make the array arr[]â€¦ Read More
Given a string S, the task for every index of the string is to find the length of the longest palindromic substring that either startsâ€¦ Read More
Given an array arr[] consisting of N integers and an integer K, the task is to find the minimum difference between the maximum and minimumâ€¦ Read More
Given an array arr[] consisting of N integers, and an integer X, the task is to find two elements from the array arr[] having sumâ€¦ Read More
Given an array arr[] consisting of N distinct integers and an array Q[] representing queries, the task for every query Q[i] is to find theâ€¦ Read More
Given two strings S1 and S2, the task is to check if S2 contains an anagram of S1 as its substring. Examples:   Input: S1 =â€¦ Read More
Given an array arr[] consisting of N pairs [L, R], where L and R denotes the start and end indices of a segment, the taskâ€¦ Read More
Given a binary string S of length N and an integer K, the task is to check if it is possible to flip K 0sâ€¦ Read More