Single Element in a Sorted Array | Leetcode 540 | Live coding session 🔥🔥🔥🔥 | 3 Approaches | BS

preview_player
Показать описание
Here is the solution to "Single Element in a Sorted Array" leetcode question. Hope you have a great time going through it.

1) 0:00 Explaining the problem out loud
2) 1:50 Algorithm walkthrough
3) 6:00 Coding

For discussion/feedback

PS : Please increase the speed to 1.25X
Рекомендации по теме
Комментарии
Автор

Iam just confused sometimes in binary search. Here, while leaving left part, we are making low to mid + 1, but while leaving right part, why are we not doing high = mid - 1, instead doing only mid?

yogeshsarasraam
Автор

i got what you are doing
but not why you are doing that lol
maybe explain the intuition more

shantanusingh