Given an increasing sequence a[], we need to find the K-th missing contiguous element in the increasing sequence which is not present in the sequence.… Read More
Category Archives: Searching
Given an increasing sequence a[], we need to find the K-th missing contiguous element in the increasing sequence which is not present in the sequence.… Read More
Given a 2D grid, each cell is either a zombie 1 or human 0. Zombies can turn adjacent horizont or vertical (up/down/left/right) human beings into… Read More
N-Base modified Binary Search is an algorithm based on number bases that can be used to find an element in a sorted array arr[]. This… Read More
C++ Program for Queries to find maximum sum contiguous subarrays of given length in a rotating array
Given an array arr[] of N integers and Q queries of the form {X, Y} of the following two types: If X = 1, rotate… Read More
Given an array arr[] of N integers and Q queries of the form {X, Y} of the following two types: If X = 1, rotate… Read More
Given an array arr[] of N integers and Q queries of the form {X, Y} of the following two types: If X = 1, rotate… Read More
Given an array arr[] of N integers and Q queries of the form {X, Y} of the following two types: If X = 1, rotate… Read More
Given N numbers with no duplicates, count the number of unique triplets (ai, aj, ak) such that their XOR is 0. A triplet is said… Read More
Given N numbers with no duplicates, count the number of unique triplets (ai, aj, ak) such that their XOR is 0. A triplet is said… Read More
Given N numbers with no duplicates, count the number of unique triplets (ai, aj, ak) such that their XOR is 0. A triplet is said… Read More
Given N numbers with no duplicates, count the number of unique triplets (ai, aj, ak) such that their XOR is 0. A triplet is said… Read More
Given an array sequence arr[] i.e [A1, A2 …An] and an integer k, the task is to find the maximum possible sum of increasing subsequence… Read More
Given an array arr[]. The task is to find the maximum score that can be achieved from arr[] for i=[1, N-2]. The conditions for scoring… Read More
Given a string S of lowercase English alphabets, the task is to find the minimum number of characters to be changed such that the left… Read More
Courses