9

Find the element that appears once in sorted array | SDE Sheet | Hashing

 2 years ago
source link: https://www.geeksforgeeks.org/videos/find-the-element-that-appears-once-in-sorted-array/
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.
neoserver,ios ssh client

Find the element that appears once in sorted array

Find the element that appears once in sorted array | SDE Sheet | Hashing
Video Player is loading.
Loaded: 0%
00:00
Remaining Time -10:14
  • 05/05/2022

In this video we will see when given a sorted array in which all elements appear twice (one after one) and one element appears only once. Find that element in O(log n) complexity.

Example: Input: arr[] = {1, 1, 3, 3, 4, 5, 5, 7, 7, 8, 8} Output: 4

Check out the video to see how we implement this!!

Practice Problem: https://practice.geeksforgeeks.org/problems/find-the-element-that-appears-once-in-sorted-array0624/1 Article: https://www.geeksforgeeks.org/find-the-element-that-appears-once-in-a-sorted-array/ SDE Sheet: https://www.geeksforgeeks.org/sde-sheet-a-complete-guide-for-sde-preparation/


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK