Given a sorted array of N integers, write a program to find the index of the first occurrence of the

Continue reading# Category: Binary search

## Search in an infinite sorted array

Problem Statement: “Given an array containing infinite sorted integers and an element, write a program to find the position of

Continue reading## Time Complexity of binary search using Recursion Tree

What is Binary Search? Binary Search is the shortest way of finding the element in an array (Assuming – all

Continue reading## Count Occurrences in Sorted Array

Problem Statement: You are given a sorted array containing N integers and a number X, you have to find the

Continue reading## Operations on Arrays

What is an array? An array is a data structure that stores homogeneous/same data type values in it, and the

Continue reading## Binary Search : Analysis

Binary Search : Space/Time Complexity Analysis of Binary Search Binary search is one of the searching algorithms which falls into

Continue reading## Binary Search: Explained

This is the very first article of the Binary Search series. Until now, we have learned the linear search algorithm.

Continue reading## Median of Two Sorted Arrays of different sizes

Problem Statement: Given two sorted arrays arr1 and arr2 of size m and n respectively, return the median of the

Continue reading## Nth Root of a Number using Binary Search

Problem Statement: Given two numbers N and M, find the Nth root of M. The nth root of a number

Continue reading## Search Single Element in a sorted array

Problem Statement: Given an array of N integers. Every number in the array except one appears twice. Find the single

Continue reading