Binary Search - Iterative Implementation and common errors

Поделиться
HTML-код
  • Опубликовано: 7 ноя 2024

Комментарии • 37

  • @Supercool7042
    @Supercool7042 2 года назад +5

    this channel is gold for data structures learners

  • @michaelwood2292
    @michaelwood2292 10 лет назад +27

    Thanks for the videos. I appreciate your time and knowledge....

  • @russel_dev
    @russel_dev 8 лет назад +8

    Best video ever could be on Binary Search !!!! Thanks a lot :)

  • @MrKaprson
    @MrKaprson 11 лет назад +17

    really nice... I´m kinda angry, because your alhorythm works really nicely, and contains less than 10 lines . My conained over fifty and still didn´t work :D ... But now it does. Truth is that sometimes you need to return not only one index, but a list of it, for there can be more than one possition with the given value. Keep up please, your vids are really educative and entertaining :)

    • @brunomello6305
      @brunomello6305 7 лет назад

      I believe that binary search only considers the two possible questions: Is the element in the array? and if it is, what is the index of the first ocurrency of it?

  • @jigarkapadiya1198
    @jigarkapadiya1198 6 лет назад +11

    logic at 8:58 how thorough he is with the algorithm...ONLY HE EXPLAINED WHY WE DO THIS

  • @moturulaxman3234
    @moturulaxman3234 2 года назад

    Nice explanation,after watching this video I have the full idea of binary search, thank you so much

  • @sourav2726
    @sourav2726 6 лет назад +1

    One of the best channel.and sir the way you teach is just awesome

  • @sourabhmazumdar2610
    @sourabhmazumdar2610 7 лет назад +2

    GREAT VIDEO ON BINARY SEARCH SIR.

  • @the3idiots787
    @the3idiots787 3 года назад

    the last point is very benificial.

  • @krishanudutta2943
    @krishanudutta2943 3 года назад

    Excellent Explanation sir thanks a lot...

  • @pranavganorkar2379
    @pranavganorkar2379 10 лет назад

    Excellent Series on Binary Search.....

  • @Kashif_Javaid
    @Kashif_Javaid 11 лет назад +1

    very nice, keep it up, hope you can touch on circular buffer

  • @095_shaniabalkhi9
    @095_shaniabalkhi9 3 года назад

    Awesome tutorial!

  • @jobayerrifad544
    @jobayerrifad544 7 лет назад +1

    u are a life saver!!

  • @4w0ken
    @4w0ken 9 лет назад +3

    dude i love u srsly.

  • @arthur6892
    @arthur6892 8 лет назад +1

    You are the best.

  • @narayankhatri6812
    @narayankhatri6812 8 лет назад

    Great tutorial... Thanks and hope more videos .... related

  • @neverforget2556
    @neverforget2556 2 года назад

    What I want to return multiple results that have the same variable? In iterative binary search

  • @sanketwalunj6580
    @sanketwalunj6580 3 года назад

    Which compiler is he using ?

  • @DanielSColao
    @DanielSColao 4 года назад

    Great video!

  • @adarshkotali
    @adarshkotali 8 лет назад

    please add indexed sequential search

  • @crazy9780
    @crazy9780 3 года назад

    After watching the video I realized that you don't need to put {} in if statement with one execution

  • @TheHarsh2318
    @TheHarsh2318 7 лет назад

    Will this work when 2 duplicate elements are stored in an array?

    • @bhavyadesai6528
      @bhavyadesai6528 4 года назад

      Yes it will work, but it will return only the index of the first occurrence of that element in the array, as the main motive of binary search is to check whether an element is present in a given array or not... And if present, then at which index.

    • @TheHarsh2318
      @TheHarsh2318 4 года назад +1

      @@bhavyadesai6528 I asked this question 3 years ago.. funny.. you replied now😂😂

    • @Nikhil-qi4oz
      @Nikhil-qi4oz 2 года назад

      @@TheHarsh2318 and I saw now, so funny

  • @bcaignou4647
    @bcaignou4647 7 лет назад +1

    i tried to compile online but it shows
    $gcc -o main *.c
    $main
    Enter a number
    the number 0 is not present in the array

  • @dominicanotacools1661
    @dominicanotacools1661 8 лет назад +1

    Can I have the java file? I'm just a student.

    • @anshumansingh9761
      @anshumansingh9761 7 лет назад

      I'd suggest you try to implement it on your own first :) You can obviously get the implementation from GeeksforGeeks.org afterwards.

  • @Alohamora007
    @Alohamora007 8 лет назад

    Dude what's your name , i know codeschool , would like to know the dude behind this screen

    • @sunnyraj2289
      @sunnyraj2289 7 лет назад +2

      Animesh Nayan

    • @ravisinha1310
      @ravisinha1310 3 года назад

      @@sunnyraj2289 its so sad that this channel ended after tragic death of lord harshal

  • @tanaynarshana4056
    @tanaynarshana4056 7 лет назад +4

    couldn't we just do (low/2+high/2) instead of low + (high-low)/2 ?

    • @parasmahajan7741
      @parasmahajan7741 6 лет назад +9

      (3/2 + 7/2) would give (1+3)=4.
      3+ (7-3)/2 would give 5.
      So this would give wrong result when both low and high are odd.

    • @liquidmetal718
      @liquidmetal718 6 лет назад

      we can just right shift.

    • @ahmidahmid9303
      @ahmidahmid9303 5 лет назад

      if low 0 you cant divide by zero