Given a sorted array of N integers, write a program to find the index of the first occurrence of the
Continue readingCategory: 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 readingTime 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 readingCount 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 readingOperations on Arrays
What is an array? An array is a data structure that stores homogeneous/same data type values in it, and the
Continue readingBinary Search : Analysis
Binary Search : Space/Time Complexity Analysis of Binary Search Binary search is one of the searching algorithms which falls into
Continue readingBinary Search: Explained
This is the very first article of the Binary Search series. Until now, we have learned the linear search algorithm.
Continue readingMedian 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 readingNth 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 readingSearch 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