Given the integers N, K and M, the task is to find the Kth number greater than N whose sum of digits is divisible by… Read More

# Tag Archives: Binary Search

Given an array arr[] consisting of N integers, the task is to count all disjoint pairs having absolute difference at least K. Note: The pair (arr[i],… Read More

Vector is a legacy class in Java and is present from Java 1.2 version. It implements the List interface of the Collection framework and is… Read More

Given a sorted array arr[] consisting of N distinct integers and an integer K, the task is to find the index of K, if it’s… Read More

Given a sorted array arr[] of size N and an array Q[][] having queries in the form of {x, y}. In each query {x, y},… Read More

Given an array A[] consisting of N distinct integers and another array B[] consisting of M integers, the task is to find the minimum number… Read More

Given an integer, P denoting the number of chocolates and an array a[] where ai denotes the type of ith chocolate. There are N people… Read More

Given an array arr[], the task is to maximize the length of increasing subsequence by replacing elements to greater or smaller prime number to the… Read More

Given an array arr[] consisting of N strings and an array Query[] consisting of Q queries. Each string in arrays arr[] and Query[] is of… Read More

Given an array arr[] sorted in decreasing order, and an integer X, the task is to check if X is present in the given array… Read More

Given an array arr[] consisting of N integers in non-increasing order, representing citations, the task is to find the H-index. H-Index is usually assigned to… Read More

Given an array arr[][] containing pairs of integers in increasing order of GCDs, and an integer K, the task is to find a pair of… Read More

Given the three integers N, X, and Y the task is to find an N length arithmetic progression series with the least possible first term… Read More