Given two positive integers W and H and N rectangles of dimension W*H, the task is to find the smallest size of the square required… Read More

# Tag Archives: Binary Search

Given three arrays a[], b[] and c[] of sizes A, B and C respectively, the task is to find the minimum possible value of abs(a[i]… Read More

Given an array arr[] consisting of N positive integers and a positive integer K, the task is to minimize the maximum element present in the… Read More

Given two positive integers X and K, the task is to find the minimum value of N possible such that the sum of all natural… Read More

Given a matrix A[][] of size N * M and a 2D array queries[][] consisting of Q queries of the form {L, R}, the task… Read More

Given an array arr[][] of size N, consisting of pairs of coordinates such that arr[i][0] and arr[i][1] represents the X and Y coordinates in a… Read More

GUI(Graphical User Interface) helps in better understanding than programs. In this article, we will visualize Binary Search using JavaScript. We will see how the elements… Read More

Given an array arr[] consisting of N integers, and an integer X, the task is to find two elements from the array arr[] having sum… Read More

Given an array arr[] consisting of N pairs [L, R], where L and R denotes the start and end indices of a segment, the task… Read More

Competitive Programming is vital for one’s development in the coding field. This article is going to discuss some basics points one should keep in mind… Read More

Given a string S of length N and an array Q[][] of dimension M × 3 consisting of queries of type {L, R, C}, the… Read More

Given a positive integer X (1 ≤ X ≤ 106), the task is to find the minimum value N, such that the sum of first… Read More

Given a 2D array segments[][] where each segment is of the form [L, R] representing (X, Y) co-ordinates, the task is to find a segment… Read More

Given two integers L and R, the task is to calculate the count of numbers from the range [L, R] having exactly 5 distinct positive… Read More

Given two arrays A[] and B[] consisting of N integers and an integer K, the task is to find the maximum value of B[i] +… Read More