## Check if the bracket sequence can be balanced with at most one change in the position of a bracket | Set 2

Given a bracket sequence as a string str, the task is to find whether the given string can be balanced by moving at most one… Read More »

## Count of triplets in an array that satisfy the given conditions

Given an array arr[] of N elements, the task is to find the count of triplets (arr[i], arr[j], arr[k]) such that (arr[i] + arr[j] +… Read More »

## Check if any K ranges overlap at any point

Given N ranges [L, R] and an integer K, the task is to check if there are any K ranges which overlap at any point.… Read More »

## Kth number from the set of multiples of numbers A, B and C

Given four integers A, B, C and K. Assume that all the multiples of A, B and C are stored in a set in sorted… Read More »

## Find next greater element with no consecutive 1 in it’s binary representation

Given Q queries where each query consists of an integer N and the task is to find the smallest integer greater than N such that… Read More »

## QuickSelect (A Simple Iterative Implementation)

Quickselect is a selection algorithm to find the k-th smallest element in an unordered list. It is related to the quick sort sorting algorithm. Examples:… Read More »

## Sentinel Linear Search

Sentinal Linear Search as the name suggests is a type of Linear Search where the number of comparisons are reduced as compared to a traditional… Read More »

## Check duplicates in a stream of strings

Given an array arr[] of strings containing the names of employees in a company. Assuming that the names are being entered in a system one… Read More »

## Absolute difference between the XOR of Non-Prime numbers and Prime numbers of an Array

Given an array arr[] of N positive integers, the task is to calculate the absolute difference between XOR of non-prime numbers and prime numbers. Note… Read More »

## Check if the array has an element which is equal to XOR of remaining elements

Given an array arr[] of N elements, the task is to check if the array has an element which is equal to the XOR of… Read More »

## Find the farthest smaller number in the right side

Given an array arr[] of size N. For every element in the array, the task is to find the index of the farthest element in… Read More »

## m-WAY Search Trees | Set-1 ( Searching )

The m-way search trees are multi-way trees which are generalised versions of binary trees where each node contains multiple elements. In an m-Way tree of… Read More »

## Length of longest subarray in which elements greater than K are more than elements not greater than K

Given an array arr[] of length N. The task is to find the length of the longest subarray in which elements greater than a given… Read More »