In this blog, we will talk about binary search in data structure. Binary Search is one of the most curious topics of data structures as it decreases the time complexity...
CONCEPTS USED: Binary Search DIFFICULTY LEVEL: Medium PROBLEM STATEMENT(SIMPLIFIED): Given an array A of N integers, such that till a point these integers are strictly increasing and after that strictly...
CONCEPTS USED: Binary Search DIFFICULTY LEVEL: Hard PROBLEM STATEMENT(SIMPLIFIED): Given number of chocolates in N different bags and M children. Every kid will get some consecutive bags. The task is...
CONCEPTS USED: Binary Search DIFFICULTY LEVEL: Medium PROBLEM STATEMENT(SIMPLIFIED): Given an array A, such that it is arranged in an Arithmetic Progression, but one element from this A.P. is missing,...
CONCEPTS USED: Binary Search DIFFICULTY LEVEL: Hard PROBLEM STATEMENT(SIMPLIFIED): Given an array of N size containing the positions of N magnets. These magnets are repelling each other. The magnets on...
CONCEPTS USED: Binary Search DIFFICULTY LEVEL: Easy PROBLEM STATEMENT(SIMPLIFIED): Given a sorted array of 0's and 1's of size N, find the first occurrence of 1 if present else return...
CONCEPTS USED: Binary Search DIFFICULTY LEVEL: Hard PROBLEM STATEMENT(SIMPLIFIED): Given an array A containing N elements, construct a new array countSmaller[] such that countSmaller[i] contains count of smaller elements on...