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

## Minimum index i such that all the elements from index i to given index are equal

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 »

## Check if it is possible to reach a number by making jumps of two given length

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 »

## Count of strings that become equal to one of the two strings after one removal

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

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 »

## Cost to make a string Panagram | Set 2

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 »

## Weighted sum of the characters of a string in an array | Set 2

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 »

## Number of subarrays have bitwise OR >= K

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 »

## Occurrences of a pattern in binary representation of a number

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 »

## Pairs with same Manhattan and Euclidean distance

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 »

## Remove exactly one element from the array such that max – min is minimum

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 »

## Jump in rank of a student after updating marks

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 »

## Minimize the maximum minimum difference after one removal from array

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 »

## Minimum in an array which is first decreasing then increasing

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 »

## Integers from the range that are composed of a single distinct digit

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 »