Linear Vs Binary Search + Code in C Language (With Notes)

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

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

  • @CodeWithHarry
    @CodeWithHarry  4 месяца назад +17

    Hope you liked the video. If you are into C, C# or C++, download the best IDE for C, C# and C++ here: bit.ly/WholeTomato-CWH

    • @Jitu_27
      @Jitu_27 4 месяца назад +1

      ❤harry bhai... From West Bengal ❤

    • @HabibaAnjum-x6i
      @HabibaAnjum-x6i 4 месяца назад

      the whole code by you is amazing

  • @adarsh5997
    @adarsh5997 2 месяца назад +9

    this video was uploaded 4 years ago so the person who watched it then in 1st year would be graduating and sitting in interviews by now damn thanks Harry

  • @harshitachaurasia1246
    @harshitachaurasia1246 4 года назад +623

    All his students gonna achieve something best in their life

  • @jaskaran_lol
    @jaskaran_lol 4 года назад +159

    I respect your Hardwork Sir...

  • @vaibhavbhatnagar951
    @vaibhavbhatnagar951 4 года назад +5

    Harry bhai apka examples ki takkar ma koi nahi ha.... Bilkul crystal clear concepts ho jata ha

  • @aradhana8505
    @aradhana8505 3 года назад +151

    Your examples are always to the point, and makes it very easy to understand the concept, Thanks!! And notes are fabulous man, Too gud 🤩👌👌

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

      As these comment is 10 monts ago....does these course help you ?

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

      Hi

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

      loveeeee

    • @SN1638
      @SN1638 6 месяцев назад +1

      Abhi kaha par ho🤔

  • @rifasehar5983
    @rifasehar5983 4 года назад +64

    5:27 best example till date sunne se pehle hi samaj aagya ☺️☺️

  • @riajikbal2938
    @riajikbal2938 2 года назад +11

    I just can't believe all these resources are free ! Salute you Harry Bhai 👍

  • @keshavcodex4173
    @keshavcodex4173 3 года назад +16

    05:23 best examples, keeep giving example

  • @DesiSwishInsights
    @DesiSwishInsights 4 года назад +6

    bhai the speed with which you are growing is all because of your hardwork. this playlist will help students for years. Marks my words

  • @himagnamallikorg
    @himagnamallikorg Год назад +4

    Harry Bhai apke Drawings bade mast hote hai 🙃🙃

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

    Bhai examples ko kya hi bolu mein 🤩 .... jabki aapka padhana hi pro level ka, uska to koi jawab hi nahi 🤩🔥🔥

  • @akshatgarg338
    @akshatgarg338 2 года назад +7

    5:25 harry bhai aapke examples bahut ache hote hai please continue them

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

    Examples are necessary and your examples are good enough to grasp the concept....

  • @RahulSharma-bo5jc
    @RahulSharma-bo5jc 4 года назад +28

    Damn, harry bhai the hardwork you put in these courses. Hats off! 🙏❤️❤️
    Thankyou for such quality courses! ❤️❤️❤️

  • @ronakmaniya2005
    @ronakmaniya2005 5 месяцев назад +2

    examples
    for liner search -> as search any card from group of cards
    and for binary search -> as search any page number from 1000 pages of book
    both examples are very nice and exactly fit in the situations.

  • @virajdhumal1621
    @virajdhumal1621 4 года назад +9

    Learning from your videos is best utilisation of our time. Thanks for all the productive courses.

  • @deveshmishra7219
    @deveshmishra7219 3 года назад +17

    Awesome lecture !! I appreciate your hard work to prepare notes & the example which you took to explain.

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

    Brother, seriously yaar you are making so knowledgeable videos. I'm very much thankful to you. ❤❤

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

    You're famous.. don't worry.. you're doing very well...keep it up.. people need this.. people need you..thanks for everything..thanks for your help...your work your efforts...hats off

  • @himanshusuchak_0007
    @himanshusuchak_0007 2 года назад +12

    your examples are always up to the point and it helps us to easily understand the concept

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

    "Apne se box bnae ke samjho ache se aayegi ."........it works harry bhai ....... TYSM

  • @rajgaming6733
    @rajgaming6733 7 месяцев назад +4

    Book wali example esi thi ki sunne se pehle hi pta lgg gyi binary search algorithm❤

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

    5:18
    yarr bhaiya yeh exampl eki wajase ham Concepts ko Real world ke sath relate kar sakte hai aur hame yeh bahut dino tak yaad rahta hai aap aise hi examples diya karo
    aapke examples bahut khatrnak hote hai dimak me chaap chod jate hai 😃😃

  • @singh_04
    @singh_04 3 года назад +15

    one thing that makes your videos unique is you made our thought process strong in our own mother tongue. Hats off sir 😊

  • @shivamakhouri7726
    @shivamakhouri7726 4 года назад +9

    Maza aa gya sir ji, Sab clear cut samaj me aa Gya :)

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

    Your examples are really helpful to understand in simple words and not at all bookish language , Thank you Harry Sir.

  • @17_nikhilchinchore59
    @17_nikhilchinchore59 4 года назад +19

    this course is too much better than udemy or any other online courses. Thanks harry bhai for this course.

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

    Best DSA playlist ever! Thank you so much Harry Sir for providing it for free!

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

    You are 10000000 times better than my college teachers. App ka teaching ka tarika anokha hai. Mujh jese insan kelie aap jese teacher milna khus kismatt hoga. thank you so much. Disle sukriya. Aap jesa purr RUclips me nehi milega koi. 💓💓💓💓💓me aap ke video dekhke bahut ku6 sikha hun

  • @meaindriladas
    @meaindriladas 3 года назад +44

    Bro please add advanced things also like Kadane's algorithm, subarray, trapping rain water problem and many more which are asked by the companies. It will be very much helpful, your videos and notes are of great clarity hence I am asking you for this portions to be covered. Please Harry bhai banao.

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

    Sahi hai bhai - Perfect example (binary search)

  • @anonymous_ghost_123
    @anonymous_ghost_123 2 года назад +9

    32 hours of hardwork

  • @Vitamin_protein_USSR
    @Vitamin_protein_USSR 2 года назад +6

    I am speechless sir , may we can learn and gain knowledge by your hardwork ✨

  • @vik7337
    @vik7337 4 года назад +22

    I've never met with this kind of a guru

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

    Examples kai sath bohat achi samjh ati hai plzzz continue in the future 😇

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

    Your Teaching with Analogy is best!

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

    Your example was really fabulous and related to real life experience ❤❤

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

    you are awesome!!!!! I must say that you are doing a great job. teaching us languages in a simple way, no one can do this in this way.

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

    Bahut badhiya examples hai🔥🔥🔥❤️❤️😀

  • @rahulvyas3858
    @rahulvyas3858 3 года назад +6

    Harry , you are doing really a great job , proper explanation in depth line by line. Thanks man

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

    bhai complete indepth banana taki refere na karna pade kahi kyuki aaap best teacher ho harry bhai....

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

    I have Learned many things From your Videos..

  • @Nahibatayenge
    @Nahibatayenge 11 месяцев назад +1

    Itna sahi explanation abhi tak nahi mila tha sir

  • @bootasingh1103
    @bootasingh1103 4 года назад +37

    HARRY MAKE MORE THIS type I Like your video

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

      Hi from where you are I think I know you

  • @snehachowdhury8044
    @snehachowdhury8044 2 месяца назад

    Harry sir the example chosen is absolutely relevant and appropriate. Thank you so much sir for your relentless effort.

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

    Cool examples sir.... although I thought about another one for Binary Search....
    Suppose we're searching for a word in a dictionary....the words are arranged in a sorted order in it
    By the way I love your work ❤️❤️

  • @prasadprashantb.4001
    @prasadprashantb.4001 3 года назад

    Bhai apke example naa 😘😘😍bahut helpfull hote hai concept understand standing me🤩aise hi example dete rehna👍🙏

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

    Thank you sir ❤️

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

    Besttttt course,thanks Harry bhaiya 💯💯💯

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

    Example is superb....

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

    Makes me happy to see educational videos like these from India with so many views! I don't understand a word, but I can tell that the Indians watching this, and learning on RUclips, will be going places! Great to see this!

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

    You're Great Harry sir💙

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

    Bro , Just wanna say your explanation is ❤️and your instance during explanation of binary search is adequate to understand concept of binary 💙.It Honour be your Student.

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

    9:33 for binary search
    25:10 binary search code

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

    5:24 Your example and analogy are always best

  • @shivampandey5724
    @shivampandey5724 4 года назад +17

    Sir pls provide some links of 15 - 20 questions for practice on each and every topic

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

    thanks a lot harry this couse is really helping me a lot and also saving my money from any other online platform for learning DSA

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

    Hats off to your dedication, Harry!!
    Amazing content, such explanatory videos, notes, superb real life examples.
    What more can the learners ask for!
    One general tip for all: Always customize the playback speed as per your intake capacity, like I watched this at 2x & understood everything.
    This just helps you grasp more content in lesser time if you already have some idea about the topics.

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

    Best video on youtube for linear and binary search.

  • @traderbot742
    @traderbot742 3 года назад +3

    Examples based on real-life are awesome.

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

    Hamare teachers bhi itna mehnat padhane mai nahi karte yaar ... thanks a lot bhaiya ❤️

  • @dallalstreet1775
    @dallalstreet1775 4 года назад +5

    engeneering colleges bandh karoo , coaching centers bandh karoo
    harry bhai classes shuruu karoo youtube meyy
    thank u harry bhaiii!!!

  • @ShaileshYadav-pc1jg
    @ShaileshYadav-pc1jg 2 года назад

    05:12 ,ye book wala example to ekdum best hai harrybhai, ekdum real life example👌

  • @kishansinha8615
    @kishansinha8615 4 года назад +6

    You r donig great work bro we are always in search for some one who explain the things likes this and you have fullfill that thing with your hard work

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

    EXAMPLE ARE OBVIOUSLY NECESSARY ...AND HARRY BHI YOUR EXAMPLES ARE OUT OF THIS WORLD ...COULDN'T EXPECT MORE .

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

    Plz make a new playlist on Android Studio....I want to learn android development from you only....because your concept is very clear and you just explain all courses in an easiest and simplest way....plz make this course...it's an humble request

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

      Already make please check his channel videos

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

      I know but that Playlist was very short....I want a playlist just like a course such as C Language......I've already watched all his videos.

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

    Harry bhai ,
    Congo for 500k
    👌👌👌👌👌👌👌👌

  • @harshitachaurasia1246
    @harshitachaurasia1246 4 года назад +6

    Thanks for making learning so simple :)

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

    Harry bahiya ap sa achi example koi or thori na da sakta hai you are best brother 🤗🤗

  • @ajaysalunke9106
    @ajaysalunke9106 4 года назад +5

    Hi Bro, I am watching your videos since last month and I really love the way you teach.Bro,I am in 4th year Degree in IT field .How would I get a job , what should I learn to get prepared for interviews in coming 6 months.

  • @AbhimanyuKumar-tx9vy
    @AbhimanyuKumar-tx9vy 2 года назад

    5:33 bht accha example hai Harry bhai, ♥️♥️♥️

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

    Haris, if we would have made the low=mid and high=mid instead of the low=mid+1 and hight=mid-1, it would not affect the duration of the program right?

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

    bahut hard harry bhai mza aa rha he cource me

  • @suryanmandal
    @suryanmandal 6 месяцев назад +1

    00:00 Binary search is a smarter algorithm
    04:54 Binary search is a search algorithm that works efficiently on a sorted array.
    09:30 Binary Search is faster than Linear Search
    14:00 The video discusses linear and binary search algorithms.
    18:55 Linear search is a straightforward way of searching for an element in an array.
    22:56 This is a coding explanation video
    26:58 Implementing linear and binary search algorithms in simple language.
    31:20 The probability of asking a question is very high.

  • @priteshshinde6779
    @priteshshinde6779 3 года назад +3

    What if array is unsorted?
    We can go for linear search ofcourse, but what if we first try to sort the array and then use the binary search?
    Will it be a good approach?

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

      Again if we make unsorted to sorted array the time complexity is O(n), better to directly use linear search which is O(n) again , my opinion 🤔....

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

      @@yashwanth8350 Suppose an XYZ university has conducted a test and a total of 100 students have participated in that test. After the test is conducted, the university decided to show the performance (marks) of the students on its system web portal in an order such that highest marks student will be displayed at the top while followed by the second highest marks student and so on up to the lowest mark student.
      Now suppose the university has hired you as a C++ programmer and has assigned you the task to write a computer program which does the finding/searching based on marks in the stored data. The university has limited resources and wants to find the speed up process for searching. Which searching algorithm (Linear or Binary) will be the most suitable to use in your program for the above task?

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

    i daily watch one video before sleeping...Thankyou sir

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

    Harry bhae it could be possible that element can be found at low and high like if arr[low]==element return low and same for arr[high]

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

    Sir dil se dhanyabad for such a great content in free of cost

  • @CodeWithHarry
    @CodeWithHarry  4 года назад +222

    If possible please share this course and notes with your friends!
    Notes and code have been uploaded on the site: codewithharry.com/videos/data-structures-and-algorithms-in-hindi-12
    Instagram: instagram.com/CodeWithHarry

    • @kishan-gt9bn
      @kishan-gt9bn 4 года назад

      Bhai C++ continue karo please.

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

      hello sir please make a full course on java swing..plz plz plz full graphics..

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

      Will you teach everything in this course?

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

      Sir Photoshop in one video banao na please

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

      Sir pls upload more pygame projects

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

    Hats off for your efforts Sir,
    Literally I got habit of you voice and teaching style for my studies.
    Thank U again for such priceless efforts and help for us 💖

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

    you didnt explain sorting algorithms in this playlist can you please add that topic

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

    5:24 OP Example 👌👌👌

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

    Sir, aapse se coding sekhne me maza aa Jata h.
    Sir, Intel institute ne Jo algorithm banaya hai which algorithm can create the algorithms, us par video banaiye ga please.
    This is telling that it can cause high rate of unimploymemt of programmers

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

      Sir please reply. I am in class 9 and waiting for your reply.

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

    Your examples are best examples ever and it helps to understand the concept easy

  • @utkarshnagrale762
    @utkarshnagrale762 3 года назад +3

    I think there is some problem in the code
    Because it compare arr[mid]==element
    But the code does not compare
    arr[low]==element or arr[high]==element.
    If the element is on arr[high] or arr[low] position the program will give output element not found!

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

      Suppose an XYZ university has conducted a test and a total of 100 students have participated in that test. After the test is conducted, the university decided to show the performance (marks) of the students on its system web portal in an order such that highest marks student will be displayed at the top while followed by the second highest marks student and so on up to the lowest mark student.
      Now suppose the university has hired you as a C++ programmer and has assigned you the task to write a computer program which does the finding/searching based on marks in the stored data. The university has limited resources and wants to find the speed up process for searching. Which searching algorithm (Linear or Binary) will be the most suitable to use in your program for the above task?

  • @deep.thinking.
    @deep.thinking. 2 года назад +1

    5:26 I really thinking what will be example for Binary and you give great example

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

    Suppose an XYZ university has conducted a test and a total of 100 students have participated in that test. After the test is conducted, the university decided to show the performance (marks) of the students on its system web portal in an order such that highest marks student will be displayed at the top while followed by the second highest marks student and so on up to the lowest mark student.
    Now suppose the university has hired you as a C++ programmer and has assigned you the task to write a computer program which does the finding/searching based on marks in the stored data. The university has limited resources and wants to find the speed up process for searching. Which searching algorithm (Linear or Binary) will be the most suitable to use in your program for the above task?

  • @kingsman-8830
    @kingsman-8830 Год назад +2

    Now I clearly understand 😊😊😊😊😊😊😊

  • @tusharbharti1191
    @tusharbharti1191 4 года назад +5

    First commentry

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

    BHAI aap ka example कतई जहर aur समझने का तरीका उससे भी जहर Thanks bro😊

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

    binary search samjhana itna aasan he ye me ne kabhi socha bhe nhe tha wah sir you are great

  • @sanikhan6790
    @sanikhan6790 5 месяцев назад +4

    who see this video in 2024 🙂

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

    The best way to understand Linear search and Binary search. Loved the binary search example you gave. XD Great work Harry sir.

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

    5:23 best example for understanding 😍👀

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

    best and relatable examples...koi part aisa nhi jo smjh ni aata...love u harry bhai

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

    keep up the good work , you are giving us a 10000 rupees monthly costing course in free with your handwritten notes
    you are a fabulous and hardworking harry bhai 👌👌👌👌🫡🫡🫡🫡

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

    harry bhai me binary search bohot baar sikha but dimag me ghush hee nhi , aapke ek book ke page number wale exmaple se sara fanda clear ho gya thanks for the example ,,,,,....example dete rahiyo.

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

    Your way to explain is too good 😊😊😊 and your example is osam 🙏🏻🙏🏻🙏🏻 is topic ko itna achhe se samjhane ke liye bahut bahut dhanyawad sir

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

    The example for binary search was actually very appropriate. I appreciate it