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

Поділитися
Вставка
  • Опубліковано 16 лис 2024

КОМЕНТАРІ • 56

  • @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

  • @romaisasehrish262
    @romaisasehrish262 4 роки тому +2

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

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому

      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 😇✌

  • @shahinphatan4865
    @shahinphatan4865 2 роки тому +2

    Fan of your lecture 🖤

  • @shahghanikhan4328
    @shahghanikhan4328 2 роки тому +1

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

  • @nafisahmed3607
    @nafisahmed3607 3 роки тому +2

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

  • @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 😇

  • @vijaysinghchauhan7079
    @vijaysinghchauhan7079 4 роки тому +3

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

  • @avvii1
    @avvii1 2 роки тому

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

  • @mahjabinbintemannan8924
    @mahjabinbintemannan8924 3 роки тому +1

    This lecture was amazing

  • @prekshamishra9921
    @prekshamishra9921 4 роки тому +1

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

  • @kanharajput5443
    @kanharajput5443 3 роки тому +2

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

  • @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 ✌️

  • @parthkeskar8354
    @parthkeskar8354 3 роки тому

    Thanks for explaining

  • @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 2 роки тому +1

      @@h_s_4049 Thanks mate!

  • @nitismita1035
    @nitismita1035 2 роки тому

    Thank you Sir ❤💌

  • @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 😇

  • @HoneySinha001
    @HoneySinha001 2 роки тому

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

  • @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🤘

  • @sriramadithya4799
    @sriramadithya4799 3 роки тому

    Thanks

  • @mohdarish4195
    @mohdarish4195 3 роки тому

    Super se bhi upper

  • @nochannel2103
    @nochannel2103 3 роки тому

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

  • @nitismita1035
    @nitismita1035 2 роки тому

    Thank u 💓💗💖💛

  • @venkateshprasads8361
    @venkateshprasads8361 3 роки тому

    plz make a video on Fibonacci search

  • @mdtausifahmed6205
    @mdtausifahmed6205 2 роки тому

    amazing

  • @nidhinhari8397
    @nidhinhari8397 5 років тому +1

    Sir Which textbook are you using?

  • @masumali8356
    @masumali8356 2 місяці тому

    lovely

  • @sureshyedge3738
    @sureshyedge3738 5 років тому +1

    Thanks!!👍👍

    • @SimpleSnippets
      @SimpleSnippets  5 років тому

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

  • @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???

  • @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...

  • @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 😁

  • @dolibelel2113
    @dolibelel2113 4 роки тому

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

  • @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

  • @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;

  • @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.

  • @expert77
    @expert77 11 місяців тому