## Search element in a Spirally sorted Matrix

Given a spirally sorted matrix with N * N elements and an integer X, the task is to find the position of this given integer… Read More »

- Check if it is possible to reach a number by making jumps of two given length
- Ternary Search
- Smallest Pair Sum in an array
- Number of elements that can be seen from right side
- Meta Binary Search | One-Sided Binary Search
- Number of subarrays have bitwise OR >= K
- Check if array can be sorted with one swap
- Remove exactly one element from the array such that max - min is minimum
- Find length of longest Fibonacci like subsequence
- Search element in a Spirally sorted Matrix
- Find array elements with frequencies in range [l , r]
- Longest subarray with elements having equal modulo K
- Minimum in an array which is first decreasing then increasing
- Replace all occurrences of pi with 3.14 in a given string
- Minimize the maximum minimum difference after one removal from array
- Check if a pair with given product exists in Linked list
- Program to find Nth term divisible by a or b
- Queries to check whether a given digit is present in the given Range
- kth smallest/largest in a small range unsorted array
- Check if a string contains a palindromic sub-string of even length
- Largest element in the array that is repeated exactly k times
- Count of strings that become equal to one of the two strings after one removal
- Search in a sorted 2D matrix (Stored in row major order)
- Sum and Product of minimum and maximum element of an Array
- Count Triplets such that one of the numbers can be written as sum of the other two
- Occurrences of a pattern in binary representation of a number
- Count pairs from two arrays having sum equal to K
- Pairs with same Manhattan and Euclidean distance
- Longest subarray with elements divisible by k
- Find the k smallest numbers after deleting given elements

Given a spirally sorted matrix with N * N elements and an integer X, the task is to find the position of this given integer… Read More »

Given an array arr[] of integers and an integer pos, the task is to find the minimum index i such that all the elements from… Read More »

Given a starting position ‘k’ and two jump sizes ‘d1’ and ‘d2’, our task is to find the minimum number of jumps needed to reach… Read More »

Given two strings str1 and str2, the task is to count all the valid strings. An example of a valid string is given below: If… Read More »

Ternary search is a divide and conquer algorithm that can be used to find an element in an array. It is similar to binary search… Read More »

Given an array cost[] containing the cost of adding each alphabet from (a – z) and a string str consisting of lowercase English alphabets which… Read More »

You are given an array of strings str[], the task is to find the score of a given string s from the array. The score… Read More »

Given an array arr[] and an integer K, the task is to count the number of sub-arrays having bitwise OR ≥ K. Examples: Input: arr[]… Read More »

Given a string pat and an integer N, the task is to find the number of occurrences of the pattern pat in binary representation of… Read More »

In a given Cartesian plane, there are N points. The task is to find the Number of Pairs of points(A, B) such that Point A… Read More »

Given an array consisting of N positive integer numbers. The task is to remove exactly one element from this array to minimize max(a) – min(a)… Read More »

Given three arrays names[], marks[] and updates[] where: names[] contains the names of students. marks[] contains the marks of the same students. updates[] contains the… Read More »

Given an array arr[] of size n ≥ 3, the task is to find the minimum possible difference between the the maximum and the minimum… Read More »

Given an array of N integers where array elements form a strictly decreasing and increasing sequence. The task is to find the smallest number in… Read More »

Given two integer L and R representing a range [L, R], the task is to find the count of integers from the range that are… Read More »