sidhant kumarsidhantjaiswalsj-datastructures.hashnode.dev·Feb 13, 2025Understanding Binary Search: A Complete GuideWhen to use binary search? Use binary search when→ The dataset is sorted binary search only works on only sorted arrays Fast lookups are needed With a time complexity of O(log n), binary search is much faster than linear search (O(n)) for large d...2 likesData-StructuresBinary Search Algorithm
Aisehow-binary-search-works.hashnode.dev·Feb 10, 2025Working of Binary SearchAbout binary search It is used to find whether a number is present in a sorted list or not efficiently. Problem statement Find whether 4 is present in this arr = [1,3,4,7,8,9] or not. #include<iostream> using namespace std; int main(){ vector<in...binary search
Ibrahim Sifatibrahimsifat.com·Feb 1, 2025DSA: 2 | Binary Search Algorithms in Bangla | বাইনারি সার্চ অ্যালগরিদমQuick Note আমি একজন learner। যেভাবে আমি concept টা understand করেছি, সেভাবেই explain করার try করেছি। So... এই journey তে কোন mistake দেখলে, বা কিছু add করার থাকলে, কোন জায়গায় বুঝতে problem হলে, যেকোনো সময় comment করে জানাতে পারেন। একসাথে learning ...DSABinary Search Algorithm
Nwosu Promise Okennaokenna.hashnode.dev·Jan 4, 2025ALGORITHMS: Implementing Binary Search Algorithm in JavascriptIntroduction Imagine searching for a word in a dictionary. Would you flip through every single page? Or would you use a smarter approach, like opening to the middle to quickly narrow down where that word might be? This is the elegant power of binary ...13 likes·99 readsData Structures And AlgorithmsJavaScript
KUNALkunaltheengineer.hashnode.dev·Oct 22, 2024Intersection of Two ArraysLevel: Easy Topics: Array, Hash Table, Two Pointers, Binary Search, Sorting Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must be unique and you may return the result in any order. Example...10 likes·35 readsCodingarray
Jyotiprakash Mishrablog.jyotiprakash.org·Sep 26, 2024Introduction to SearchingSearching is the process of finding a particular element in a collection of items, such as an array, list, or database. The goal of searching is to locate the position of the desired item in the collection, if it exists, or to determine that the item...559 readssearchin
Saurav Maheshwarixauravww.hashnode.dev·Sep 15, 2024Efficiently Locate the First Bad Version of a Product with Binary SearchProblem Statement You're given a function isBadVersion(version) that returns whether a version is bad. You have a series of versions numbered from 1 to n, and your task is to find the first bad version. Once a version is bad, all the following versio...50 readsData Structures and Algorithmscoding
Saurav Maheshwarixauravww.hashnode.dev·Sep 15, 2024How Binary Search Makes Number Guessing EasyProblem Statement You are playing a game where a number is picked from 1 to n, and you have to guess the picked number. For each guess you make, you are given feedback: If your guess is higher than the picked number, the API returns -1. If your gue...47 readsData Structures and Algorithmscoding
Micah Ondiwamicahondiwa.hashnode.dev·Sep 15, 2024A Structure a Day #Day 0Problem Description: Given a list of numbers obtained by rotating a sorted list an unknown number of times, write a function to determine the minimum number of times the original sorted list was rotated to obtain the given list. Your function should ...10 likesTree rotation
Arkadipta Kunduarkadiptakundu.hashnode.dev·Sep 1, 2024The Ultimate Guide to Using Binary Search on Rotated and Repeated Arrays !Binary search is a fundamental algorithmic technique used to efficiently locate elements in a sorted array. It is always used when the array is sorted. But what do you do if there are multiple elements in that array or the array is sorted but rotated...10 likesBinary Search Algorithm