Find the odd appearing element in O(Log n) time | GeeksforGeeks

preview_player
Показать описание

This video is contributed by Parikshit Kumar Pruthi

Please Like, Comment and Share the Video among your friends.

Also, Subscribe if you haven't already! :)
Рекомендации по теме
Комментарии
Автор

Assumption:
All repeating occurrences of elements appear in pairs and these pairs are not adjacent (there cannot be more than two consecutive occurrences of any element).

GeeksforGeeksVideos
Автор

First of all thx Geeks 4 Geeks fir the video! Love you guys! This video is completely wrong! The Binary search method does not make any sense whatsoever and don’t give correct results! We are retrieving the number with the odd number of occurrences! Please whoever viewing this video ignore the binary search method it is wrong!

hermesmercuriustrismegistu
Автор

This is applicable only for an array of odd size.

yaseerahmed
Автор

Your algorithm is wrong sir as what happen if input is 1 2 2 2 2 3 3.

shivampatel
Автор

Do bit wise xor on all numbers. the number element will the remaining element.

sureshbabu-ttkc
Автор

Doesn't work!!, Take {1, 2, 2, 3, 3, 3, 3, 4, 4}, mid = 4, but odd element is on left side not right side

gyanasahu
Автор

Doesn't work!!, Take {1, 2, 32, 3, 3, 3, 3, 4, 4}, mid = 4, but odd element on left side not right side

gyanasahu
Автор

but for the binary search operation the array should be in sorted order first unsorted order input its not works..

utpalpodder-pkvq