• Courses
  • Tutorials
  • DSA
  • Data Science
  • Web Tech
April 22, 2022 |11.1K Views

Binary Search | SDE Sheet | Searching and Sorting

Description
Discussion

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/