Binary Search | SDE Sheet | Searching and Sorting
source link: https://www.geeksforgeeks.org/videos/binary-search/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
- 130 Views
- 22/04/2022
In this video we will see how to search a given element 'x' in a given sorted array arr[] of 'n' elements, using binary search.
Examples: Input: arr[] = {10, 20, 30, 50, 60, 80, 110, 130, 140, 170}, x = 110 Output: 6 Explanation: Element x is present at index 6
Check out the video to see how we implement this!!
Practice Problem: https://practice.geeksforgeeks.org/problems/binary-search/1 Article: https://www.geeksforgeeks.org/binary-search/ SDE Sheet: https://www.geeksforgeeks.org/sde-sheet-a-complete-guide-for-sde-preparation/
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK