×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship πŸŽ“
  • RANDOM
  • One Liner

binary search

A collection of 27 posts

Algorithms

Minimum Absolute Difference Between Elements With Constraint

In this article at OpenGenus, we will solve the problem called Minimum Absolute Difference Between Elements With Constraint. The article will guide you through the intuition of how to solve the problem using the concept of Binary Search and Ordered Set.

Manraj Singh Manraj Singh
Algorithms

Ceiling in a Sorted Array

You are given a sorted array of integers and a target value 'x'. Your task is to find the lower bound, which is the smallest element in the array that is greater than or equal to 'x'.

Pranay Kalakonda
Algorithms

Minimize Maximum Distance between Gas Stations [Solved 3 approaches]

You are given a sorted array β€˜arr’ of length β€˜n’, which contains positive integer positions of β€˜n’ gas stations on the X-axis. You are also given an integer β€˜k’. You have to place β€˜k’ new gas stations on the X-axis.

Pranay Kalakonda
Algorithms

Binary Search on Answer

Binary search is commonly associated with sorted arrays, but it can also be applicable to unsorted arrays in certain cases. These types of problems are known as "binary search on answer" problems.

Arravelly Keerthi
Algorithms

Find K closest numbers to a given value

In this article, we will explore on how to find the K closest numbers to a given value in a given set of numbers. We have presented two approaches using the concepts of binary search and Heap data structure.

Aswin Shailajan
binary search

K-th Smallest Number in Multiplication Table [Solved]

In this article, we have solved the problem of finding the K-th Smallest Number in Multiplication Table. This involve the concept of Binary Search.

Harshit Raj
Algorithms

Find K-th Smallest Pair Distance [Solved]

In this article, we have solved the problem of finding the K-th smallest pair distance. This involve the concept of Binary Search.

Harshit Raj
binary search

Egg Dropping Puzzle

In this article, we have explored the Egg Dropping Puzzle in depth with various algorithms including Combinatorics and Dynamic Programming.

Gabriel
Algorithms

Majority element in sorted array

In this article, we will be learning how to find the majority element in a sorted array. This involve using Linear Search, Binary Search and a constant time algorithm.

Gifty Treesa Iju Gifty Treesa Iju
divide and conquer

Find floor in sorted array

In this article, we are going to see various methods of finding the floor of a given number from a given sorted array. To solve this efficiently, the concept of Divide and Conquer / Binary Search is required.

Rahul Kumar Yadav
Dynamic Programming (DP)

Longest Increasing Subsequence [3 techniques]

In this article, we have explained the problem of Longest Increasing Subsequence along with 3 techniques (Brute force, Binary Search, Dynamic Programming).

Mudit Garg
Algorithms

K-th smallest element of two sorted arrays

In this article, we have explored algorithms to find the K-th smallest element of two sorted arrays. This involve the idea of Binary Search.

Gaduputi Thanusree
List of Mathematical Algorithms

N-th root of a number

In this article, we have explained three different algorithms to find the N-th root of a number.

Shubhankar Maurya Shubhankar Maurya
Algorithms

Find Cube root using Binary Search

In this article, we have explained the algorithm to Find Cube root using Binary Search along with Time and Space Complexity analysis.

Shubhankar Maurya Shubhankar Maurya
Algorithms

Search an element in Sorted 2D matrix

In this article, we will learn about how we can search for a particular element in a sorted 2D matrix.

TJ Kapil
Algorithms

Find Square Root of Number using Binary Search

In this article, we have discussed how to find square root of a number using binary search.

Gaduputi Thanusree
Algorithms

4 Array Sum equal to Zero (4Sum II)

In this article, we have explored insightful approaches / algorithms to find elements in 4 arrays whose sum is equal to zero. This is an extension of 4 SUM PROBLEM.

Rohan Chandrashekar Rohan Chandrashekar
Algorithms

2 Sum Closest: Find 2 elements with sum closest to target

We have explained how to solve the 2 Sum Closest problem that is Find 2 elements with sum closest to a target efficiently. We have explained 3 different approaches which involves the use of Binary Search and Two Pointer technique.

Joe Gorst Joe Gorst
Algorithms

Median of two sorted arrays

In this article, we have presented 3 Algorithms to find the Median of two sorted arrays efficiently in logarithmic time. This involves a clever use of Binary Search algorithm.

Akanksha Singh
Algorithms

Two Sum Problem: Check if pair with given sum exists [Solved]

In this article, we have explained different approaches to solve the Two Sum Problem using techniques like Binary Search, Hash Map and others.

Ue Kiao, PhD Ue Kiao, PhD
Algorithms

Intersection of two arrays

We have explored several approaches to find Intersection of two arrays efficiently. This involve techniques like sorting, binary search, hash map and much more.

Akanksha Singh
Algorithms

K-th Smallest element in a row and column wise sorted matrix

We have discussed how can we find the kth smallest element in a given n x n matrix, in which every row and column is sorted in non-decreasing order and covered 3 approaches: brute force, using min-heap and using Binary Search.

Shreya Shah Shreya Shah
Algorithms

Fractional Cascading in Binary search

Fractional Cascading is an optimization over Binary Search to perform Binary Search on K sorted lists to improve the time complexity from O(K logN) to O(logN + K). In this article, fractional cascading in binary search will be covered.

Tanvy Bhola Tanvy Bhola
Algorithms

Binary Search in a Linked List

You are given a sorted singly linked list and a key (element to be searched), find the key in the linked list using binary search algorithm. The challenge is to find the middle element as Linked List does not support random access.

Shubham Kumar
Algorithms

Distributing Candies equally

In this problem, we need to candies from N boxes each of which has different number of candies across K friends. This problem can be solved using Binary Search.

Nikita Masand Nikita Masand
OpenGenus IQ © 2025 All rights reserved β„’
Contact - Email: team@opengenus.org
Primary Address: JR Shinjuku Miraina Tower, Tokyo, Shinjuku 160-0022, JP
Office #2: Commercial Complex D4, Delhi, Delhi 110017, IN
Top Posts LinkedIn Twitter
Android App
Apply for Internship