Binary Search Algorithm (Working, Algorithm & Diagram) in Data Structures | Part 1 | DSA

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

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

  • @SimpleSnippets
    @SimpleSnippets  5 лет назад +10

    Hey Guys, if you want more such tech educational videos on this channel then please support me by subscribing to this channel & also share it with your friends as it helps me create more content just for you ✌

  • @Lalinxdboom
    @Lalinxdboom Год назад +1

    I will suggest your channel to others from now on becoz i found it very helpful more than others with good explanation nd examples

  • @shahinphatan4865
    @shahinphatan4865 2 года назад +2

    Fan of your lecture 🖤

  • @shahghanikhan4328
    @shahghanikhan4328 2 года назад +1

    it was truely amazing .... thanks for this amazing video lecture

  • @jollyllb9159
    @jollyllb9159 4 года назад +4

    U will definetely earn a lot , love ur videos.

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

      Thank you so much 😀 Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇

  • @romaisasehrish262
    @romaisasehrish262 5 лет назад +2

    hey simple snippets
    u r more then anything
    ur videos always eliminate confusion
    thnkksss alot

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

      Thank you so much buddy, I am glad to hear this from you. Please do share the videos with your friends & Definitely SUBSCRIBE. Thats the biggest help & support 😇✌

  • @mahjabinbintemannan8924
    @mahjabinbintemannan8924 3 года назад +1

    This lecture was amazing

  • @nafisahmed3607
    @nafisahmed3607 3 года назад +2

    Top to Bottom samajh Aya❤️
    Also the way he gives every code❤️
    Tanmay Bhai boss

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

      bhai is this playlist good for college exams?

  • @mjprayog
    @mjprayog 4 года назад +7

    Bro, What's the significance of mid = left+(right-left)/2, Why not just ( left+right)/2

    • @h_s_4049
      @h_s_4049 3 года назад +5

      Suppose your 'left' and 'right' are 16 bit unsigned integers. That means, they can only have a maximum value of 2^16=65536. Consider this, left = 65530 right = 65531
      If we added them first, (left+right) would end up being junk since that big a number (131061) cannot be stored in a your 16-bit integer. And so, mid would be a wrong value.

    • @tahahuraibb5833
      @tahahuraibb5833 3 года назад +1

      @@h_s_4049 Thanks mate!

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

    You made this so simple to understand. Many thanks sir!

  • @kanharajput5443
    @kanharajput5443 3 года назад +2

    why we don' t use mid=(left+right)/2 at place of mid=left+(right-left)/2

  • @dibbyabarua9499
    @dibbyabarua9499 4 года назад +4

    AWESOME explanation... as usual

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

      Thank you so much buddy🙏 Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇

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

    Super se bhi upper

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

    hey simple snnipet ur videos are amazingly gud .Thanks for providing such a great source.

  • @vijaysinghchauhan7079
    @vijaysinghchauhan7079 4 года назад +3

    Hi, Tanmay Sakpal I believe you are doing great! anyway, Binary Search is made the simplest of the simple.

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

    Thanks for explaining

  • @ayushagarwal8054
    @ayushagarwal8054 5 лет назад +4

    I will try my best to share your videos
    Sir keep on the good work, i definitely would have given you 1 k likes if possible 😍😍 thank u soo much for your other video.

    • @SimpleSnippets
      @SimpleSnippets  5 лет назад +2

      Thank you so much brother. These words itself mean so much to me. Your support is the biggest motivation my Ayush 😇
      Keep sharing the channel with your friends. There are 400+ videos on our channel so do check them out ✌️

  • @NaneteHinton
    @NaneteHinton 2 дня назад

    高質量的視頻內容!我還有一個問題:有人給我轉了点usdt,我有恢復短語。【pride】-【pole】-【obtain】-【together】-【second】-【when】-【future】-【mask】-【review】-【nature】-【potato】-【bulb】 我怎麼把它們變現呢?

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

    Thank you Sir ❤💌

  • @nidhinhari8397
    @nidhinhari8397 5 лет назад +1

    Sir Which textbook are you using?

  • @dishanamdev2620
    @dishanamdev2620 4 года назад +2

    In the last case uh said when we pass 115 as x left will become greater than right but how it will become greater thn right we just pssed a false value tht is not in the array....
    Plz telll

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

      I didnt really get your question. Can you please pin point the timecode where I said that. ✌

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

      @@SimpleSnippets you started at 19.50 at last
      One thing i want to say
      You are too much amazing, and your videos are more understandable than other
      Thanku a lot

    • @gauripawar356
      @gauripawar356 4 года назад +2

      Yes dude I saw this vdo right now... Nd I had same doubt...

  • @abhijeetbasfore6816
    @abhijeetbasfore6816 3 года назад +1

    Great work bhaiya this is best channel. bhaiya can you please make a video on Dynamic Programming?

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

      This will take time but eventually I'll cover it🤘

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

    amazing

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

    Thanks

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

    Thank u 💓💗💖💛

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

    Why loop , u can go directly to the index of mid each time and find that index value to match

  • @masumali8356
    @masumali8356 3 месяца назад

    lovely

  • @sureshyedge3738
    @sureshyedge3738 5 лет назад +1

    Thanks!!👍👍

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

      Most welcome 🤟please do share the video with your friends too ✌️

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

    20:37 Sir,how will the result if you change return -1 to return 0?

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

      he litterly said if it's 0 or other than that it i'll placed in the array as the index 0 because you said return 0;

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

    PLIS HELP :(
    mid =(left + right)/2.... for the first one mid = ( 0 + 9)/2 = 4(int)
    why did you complicated it typing " mid = left + ( right - left)/2 " ? AM I MISSING ANYTHING?? CAN I USE mid = (left + right)/2???

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

    plz make a video on Fibonacci search

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

    Mid = (left + right) is also currect
    🤷🏻‍♂️

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

    If we hv to find 95 then.. Or -5 then what will be the logic

  • @mahesh-jg3zx
    @mahesh-jg3zx 5 лет назад +1

    Sir you are explaning 💪 awesome but why you not tried to do videos in unacademy sir, actually I'm searching a videos on sorting and searching in unacademy it's there but these particular information is not given please do the videos in unacademy also

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

      Thank you mahesh for the compliments. And yes I did see how unacademy works, I found it very restrictive when it comes to making videos only using their mobile app. I like it to be flexible cause I shoot my videos on various devices 😇
      Also please do share this video with your friends buddy 😁

  • @expert77
    @expert77 Год назад

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

    why cant the mid be mid=(left+right)/2............???

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

      @@SimpleSnippets i did , but got the same thing from both .

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

      did you get it ?

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

      I think both are same

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

      Do the math. It's the same.

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

    What if there is an element in more than 1 place?let's say it's repeating.!

    • @SimpleSnippets
      @SimpleSnippets  4 года назад +2

      Then there has to be extra code to take care of that scenario which will make this complicated