Binary Search Program in Java

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

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

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

    Very nice and detailed video!

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

      Thanks for you comment. Also, you check the code link mentioned in description box.

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

    Definition of detailed explanation
    🤩

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

    detailed explanations. thank you so much for the video.

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

    Very helpful & clear. Thanks for taking the time to make this video

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

    Excellent teaching technique

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

    Thankiuu bhaiya.....it was very helpful ♥️♥️

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

    Really very helpful and detailed video. Thank you.

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

    Simple and nice example.. 👍

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

    nice n silple ...thanks..

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

    Can I hv names In the output instead of integers ?

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

    Great i am searching this

  • @o.yetunde7804
    @o.yetunde7804 6 лет назад

    Very detailed video, thank you.

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

    Awesome 💐

  • @Ahmed-wz8qb
    @Ahmed-wz8qb 6 лет назад

    Very clear
    thank you very much

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

    Sir I have a one doubt.????
    Please help me.
    My question is I have search last digit instead of mid digit and it shows last index of array. How??
    We have actually use a arr[mid ] formula then how can be a last digit index have be shown.
    I mean by seeing the code and formula. It should only show the mid value of number.
    Sir I am really confused. Please help me..... 😩😩😩😩

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

      Mid is calculated based on these two indexes. These two indexes values depends on whether the value we are searching is greater or less than the value present at mid index.

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

    Bro why doesn't it applicable for array size 5 or greater than that only applicable below size 4??

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

      It is also applicable for the array size 5

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

      @@ProgrammingTutorials1M no bro I tried u check once please actually the logic you used is wrong I think kindly check once

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

    If the highest index value is in odd then, what is the mid index value

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

      Let's assume, if start = 0 and end = 5 then mid is 2. As we have declared as int.

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

    nice video bro...

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

    my I ask why did you put mid=0 ?

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

    The Last Element does not consider in the program............ for Example we consider an array {1,2,3,4,5) and we search The Element 5 and The Output Become The Element is not present in list ,, How to solve This Problem?? plz Tell

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

      Hi Pranav, I run the code and entered the value you mentioned in the comment. The output was value found at index 4. You can check itself by running the code. Also, you check the code link mentioned in description box.

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

      OK but how it shows value of last digit. I mean by seeing the formula. It should only solve and show the mid value index.
      I am confuse. Please help me..

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

    Why did you us for loop?

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

      Just for taking number of specified inputs. You can also do it by declaring an array. In that case, you don't have to take an input.

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

    Coding tutorials done by Indians are usually:
    1. Background noise > tutorial voice. ALWAYS.
    2. IDEs that you probably have never seen, or sometimes just whiteboard.
    3. Runs the code via command prompt.
    3. Makes you feel dumb by solving complex problems like a piece of cake.

  • @MElA-qi1hc
    @MElA-qi1hc 3 года назад

    Sir I got error that is using class Scanner but location is in class BinarySearch

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

    What if the total elements of array are even

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

    Everything was good but there is not proper explanation...

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

    bro add program on BFS and DFS algrorithem in java

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

    plz expln wht is arr[i]= in.nextInt() .thnks

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

      we are taking an input and store it at each index of array. For example - arr[0] = 1, arr[1] = 2 etc

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

      arr[i] = in.nextInt() is taking the user inputted values and putting them into the array.....

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

    sorry its my mistake bro so sorry