## 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 »

- Next Smaller Element
- Find the Missing Number in a sorted array
- Find the index of an array element in Java
- Check if it is possible to reach a number by making jumps of two given length
- Number of elements that can be seen from right side
- Smallest Pair Sum in an array
- Count pairs in a binary tree whose sum is equal to a given value x
- Variants of Binary Search
- Remove exactly one element from the array such that max - min is minimum
- Binary Search In JavaScript
- Binary Search (bisect) in Python
- Meta Binary Search | One-Sided Binary Search
- Longest subarray with elements having equal modulo K
- Number of subarrays have bitwise OR >= K
- Ternary Search
- Check if array can be sorted with one swap
- Find array elements with frequencies in range [l , r]
- Find kth node from Middle towards Head of a Linked List
- Minimum in an array which is first decreasing then increasing
- Minimize the maximum minimum difference after one removal from array
- Replace all occurrences of pi with 3.14 in a given string
- Program to find Nth term divisible by a or b
- Find length of longest Fibonacci like subsequence
- Length of largest sub-array having primes strictly greater than non-primes
- Median of two sorted arrays of different sizes | Set 1 (Linear)
- Queries to check whether a given digit is present in the given Range
- Count of strings that become equal to one of the two strings after one removal
- Check if a string contains a palindromic sub-string of even length
- Largest element in the array that is repeated exactly k times
- Search in a sorted 2D matrix (Stored in row major order)

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 »