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

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ธ.ค. 2024

ความคิดเห็น • 901

  • @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 3 หลายเดือนก่อน

      the whole code by you is amazing

  • @jaskaran_lol
    @jaskaran_lol 4 ปีที่แล้ว +157

    I respect your Hardwork Sir...

  • @adarsh5997
    @adarsh5997 2 หลายเดือนก่อน +7

    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

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

  • @harshitachaurasia1246
    @harshitachaurasia1246 4 ปีที่แล้ว +617

    All his students gonna achieve something best in their life

  • @vaibhavbhatnagar951
    @vaibhavbhatnagar951 4 ปีที่แล้ว +5

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

  • @rifasehar5983
    @rifasehar5983 4 ปีที่แล้ว +63

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

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

  • @riajikbal2938
    @riajikbal2938 2 ปีที่แล้ว +10

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

  • @ronakmaniya2005
    @ronakmaniya2005 4 หลายเดือนก่อน +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.

  • @akshatgarg338
    @akshatgarg338 2 ปีที่แล้ว +7

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

  • @rohankhapre5996
    @rohankhapre5996 3 ปีที่แล้ว +2

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

  • @himagnamallikorg
    @himagnamallikorg 11 หลายเดือนก่อน +4

    Harry Bhai apke Drawings bade mast hote hai 🙃🙃

  • @keshavcodex4173
    @keshavcodex4173 3 ปีที่แล้ว +16

    05:23 best examples, keeep giving example

  • @suryadana1798
    @suryadana1798 4 ปีที่แล้ว +7

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

  • @aasimahsan6167
    @aasimahsan6167 4 ปีที่แล้ว

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

  • @gajananbhoyar5323
    @gajananbhoyar5323 4 ปีที่แล้ว +2

    Sahi hai bhai - Perfect example (binary search)

  • @shivamakhouri7726
    @shivamakhouri7726 4 ปีที่แล้ว +9

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

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

  • @virajdhumal1621
    @virajdhumal1621 4 ปีที่แล้ว +9

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

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

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

  • @deveshmishra7219
    @deveshmishra7219 3 ปีที่แล้ว +17

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

  • @vismayyerunkar1374
    @vismayyerunkar1374 4 ปีที่แล้ว +2

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

  • @rajgaming6733
    @rajgaming6733 6 หลายเดือนก่อน +4

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

  • @deep.thinking.
    @deep.thinking. 2 ปีที่แล้ว +1

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

  • @RahulSharma-bo5jc
    @RahulSharma-bo5jc 4 ปีที่แล้ว +27

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

  • @himanshusuchak_0007
    @himanshusuchak_0007 2 ปีที่แล้ว +12

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

  • @anonymous_ghost_123
    @anonymous_ghost_123 2 ปีที่แล้ว +9

    32 hours of hardwork

  • @DristiHandiqueRA
    @DristiHandiqueRA 3 ปีที่แล้ว +5

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

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

  • @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 TH-cam me nehi milega koi. 💓💓💓💓💓me aap ke video dekhke bahut ku6 sikha hun

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

  • @KrishnaKumar-oe1fq
    @KrishnaKumar-oe1fq 3 ปีที่แล้ว +1

    user-friendly example outstanding

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

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

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

  • @ashish_srj
    @ashish_srj 3 ปีที่แล้ว

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

  • @harshitachaurasia1246
    @harshitachaurasia1246 4 ปีที่แล้ว +7

    Your Teaching with Analogy is best!

  • @abdullahnoor565
    @abdullahnoor565 2 ปีที่แล้ว +2

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

  • @sakshiugale4891
    @sakshiugale4891 4 ปีที่แล้ว +7

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

  • @Nahibatayenge
    @Nahibatayenge 10 หลายเดือนก่อน +1

    Itna sahi explanation abhi tak nahi mila tha sir

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

  • @bulukivine8238
    @bulukivine8238 4 ปีที่แล้ว +1

    bahut hard harry bhai mza aa rha he cource me

  • @jaskaran_lol
    @jaskaran_lol 4 ปีที่แล้ว +4

    I have Learned many things From your Videos..

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

  • @Vitamin_protein_USSR
    @Vitamin_protein_USSR 2 ปีที่แล้ว +6

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

  • @mujeeburrehman8145
    @mujeeburrehman8145 3 ปีที่แล้ว

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

  • @vik7337
    @vik7337 4 ปีที่แล้ว +22

    I've never met with this kind of a guru

  • @priyanshupriyadarshan6332
    @priyanshupriyadarshan6332 3 ปีที่แล้ว

    Bhaiya apke examples sabse best aur sath hi sath utne hi simple hai

  • @rahulvyas3858
    @rahulvyas3858 2 ปีที่แล้ว +6

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

  • @rglover6235
    @rglover6235 3 ปีที่แล้ว

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

  • @ee_22_dharamkumar91
    @ee_22_dharamkumar91 3 ปีที่แล้ว +5

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

  • @kumkumbhagya51
    @kumkumbhagya51 2 ปีที่แล้ว

    5:19 ek dam best examples hote hai aapke like topic ki definition se 1 percent na clear hua hoga lekin fir aapke example se poora clear ho jaata hai fir vo topic

  • @Asish0089
    @Asish0089 2 ปีที่แล้ว +2

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

  • @nurainkhan4968
    @nurainkhan4968 4 ปีที่แล้ว

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

  • @bunnykumar7796
    @bunnykumar7796 4 ปีที่แล้ว +4

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

  • @syedarifhassan
    @syedarifhassan ปีที่แล้ว +1

    @CodeWithHarry
    //BINARY SEARCH
    #include
    int main()
    {
    int i, low, high, mid, n, key, array[100];
    printf("Enter number of elements");
    scanf("%d",&n);
    printf("Enter %d integersn", n);
    for(i = 0; i < n; i++)
    scanf("%d",&array[i]);
    printf("Enter value to findn");
    scanf("%d", &key);
    low = 0;
    high = n - 1;
    mid = (low+high)/2;
    while (low high)
    printf("Not found! %d isn't present in the list.n", key);
    return 0;
    }

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

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

  • @UECAshutoshKumar
    @UECAshutoshKumar 2 ปีที่แล้ว +3

    Thank you sir ❤️

  • @deepaksarangi3663
    @deepaksarangi3663 2 ปีที่แล้ว +2

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

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

  • @madhabmukherjee1675
    @madhabmukherjee1675 4 ปีที่แล้ว +2

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

  • @shivampandey5724
    @shivampandey5724 4 ปีที่แล้ว +17

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

  • @sufiyanmogal1527
    @sufiyanmogal1527 ปีที่แล้ว

    5:18
    bhai apke example bhot acche hai easy hai aur bhot hi zyada topic ke relatated
    hai

  • @dallalstreet1775
    @dallalstreet1775 4 ปีที่แล้ว +5

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

  • @sudipbera5178
    @sudipbera5178 4 ปีที่แล้ว +1

    bahut a66a example hayy HArry Bhai

  • @binoyranjanpradhan6653
    @binoyranjanpradhan6653 4 ปีที่แล้ว +4

    Example is superb....

  • @RitulSingh
    @RitulSingh 4 ปีที่แล้ว +2

    Best video on youtube for linear and binary search.

  • @harshitachaurasia1246
    @harshitachaurasia1246 4 ปีที่แล้ว +6

    Thanks for making learning so simple :)

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

  • @manjula8718
    @manjula8718 ปีที่แล้ว +1

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

  • @somsubhrochakraborty9941
    @somsubhrochakraborty9941 2 ปีที่แล้ว +2

    Examples makes the concepts easy for understanding

  • @sujanshahi6819
    @sujanshahi6819 4 ปีที่แล้ว +4

    You're Great Harry sir💙

  • @oneoflittlecitizen
    @oneoflittlecitizen 2 ปีที่แล้ว +2

    5:39
    Example is very nice sir, keep giving such more examples.

    • @fariyabkhan8095
      @fariyabkhan8095 ปีที่แล้ว

      why do we return -1 , not any other value?

  • @traderbot742
    @traderbot742 3 ปีที่แล้ว +3

    Examples based on real-life are awesome.

  • @hashi_majak2007
    @hashi_majak2007 4 หลายเดือนก่อน +1

    Harry bhai muje linear our binary search me time equal lag rha h ❤❤

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

  • @saurabhsingh4426
    @saurabhsingh4426 3 ปีที่แล้ว +1

    Example bhaut aache lag rahe hai Bhaiya 😊.

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

  • @dilipsunar99
    @dilipsunar99 4 ปีที่แล้ว +2

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

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

  • @tejaswini9235
    @tejaswini9235 3 ปีที่แล้ว +2

    Thanks sir........
    Your videos and notes is very helpful.

  • @priteshshinde6779
    @priteshshinde6779 2 ปีที่แล้ว +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?

  • @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 TH-cam, will be going places! Great to see this!

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

  • @ShaileshYadav-pc1jg
    @ShaileshYadav-pc1jg 2 ปีที่แล้ว

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

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

  • @dgmusicsongs
    @dgmusicsongs 4 ปีที่แล้ว +2

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

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

    • @kaustubhratwadkar9911
      @kaustubhratwadkar9911 ปีที่แล้ว +1

      because the marks will not be sorted so it should be linear

  • @girrajdohare
    @girrajdohare 3 ปีที่แล้ว +2

    5:24 Your example and analogy are always best

  • @tusharbharti1191
    @tusharbharti1191 4 ปีที่แล้ว +5

    First commentry

  • @pranjalck
    @pranjalck 3 ปีที่แล้ว +2

    5:23 best example for understanding 😍👀

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

  • @viditz1
    @viditz1 4 ปีที่แล้ว +3

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

  • @prasadprashantb.4001
    @prasadprashantb.4001 3 ปีที่แล้ว

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

  • @sanikhan6790
    @sanikhan6790 5 หลายเดือนก่อน +4

    who see this video in 2024 🙂