Counting Sort | Easiest explanation with example

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

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

  • @abhishekdhiman6500
    @abhishekdhiman6500 2 года назад +50

    Told about your channel to my friend, now whole batch watches your video ✌🏻❤️

  • @sahidurrahman6175
    @sahidurrahman6175 2 года назад +18

    The title of the video 'Easiest explanation' is absolutely right.
    Keep teaching us.

  • @saipranavi3725
    @saipranavi3725 2 года назад +28

    I was stressed when I didn't find this topic in your videos. Now, iam happy. Thank you.

  • @iamnehanupur
    @iamnehanupur Год назад +11

    After watching a lot of videos I got my doubts clear only by you sir. Thank you so much. 🙏🏻

  • @JohnWick-fc2xz
    @JohnWick-fc2xz Год назад +3

    Nice and clear >> Understand on 1st turn. better than apna college.

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

    The thing I was trying to understand from days and you make me learned in few minutes. ALLAH BLESS you.

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

    you are a genius sir....lots of love!

  • @kiranbendigeri2238
    @kiranbendigeri2238 Год назад +12

    Explanation is very clear...Excellent. :)

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

    Allah aplogo ka bhala kre, Itna easily samjhaya, jo hamain University main samajh hi nai tha araha, Love u sir❤❤💯💯

  • @bibhukishan6576
    @bibhukishan6576 2 года назад +86

    Correction: Count sort is based on stable sort which means that relative order of values in original array should not be disturbed. So we can't directly print the array just by looking at the frequency of the elements . After storing the frequency of elements, we will update the frequency array by storing the prefix sum and then only we will form a new array of size equal to the original array and we will traverse the original array and store the values in the new array in accordance with the prefix sum .

    • @Singh_Ankit
      @Singh_Ankit Год назад +3

      Ya his method is not correct

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

      But radix sort is stable sort

    • @Coder-rohits
      @Coder-rohits Год назад

      bro i didn't got ur point can u pls explain me

    • @smitpatel9275
      @smitpatel9275 Год назад +3

      Yes, this method isn't correct Many youtubers use this method but it's wrong. My marks got deducted 😢.

    • @abdullahkhalid3055
      @abdullahkhalid3055 11 месяцев назад

      ruclips.net/video/pEJiGC-ObQE/видео.html

  • @Eswar.
    @Eswar. 2 года назад +11

    You are a great teacher
    I would love to train for GATE under you
    Hope you will help

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

    Yesterday I was searching for your counting sort video and couldnt find..and today you uploaded the video what a coincedence

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

    Woahh, new board!! Congratulations sir :)

  • @Imaginary_World-k9m
    @Imaginary_World-k9m 9 месяцев назад +1

    Ever Green Channel🙌❤

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

    thankyou so much sir very good explanation

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

    Prove helpful before exam's 2 hours ❤

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

    DAA series..🤩

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

    👏👏👏
    Thanks for explaining.

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

    Got selected in ibps so it officer with help of you thank you sir

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

      Congratulations Brother....... 🎊🎉🎊🎉 You Rocks 🥰🥰🥰
      Last but not Least Mera to Nahin Hua....... I'm accepting my defeat Like a King 👑 Muje to tabhi interview k time hi pata chal gaya tha Jab Chocolate khila kar bola tha Shaadi waadi Karo Abhi tumhari Age hi Kya Hai 😂😂😂

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

      @@Eclipso619😂

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

      @@Chaudharyhammad Kya kare Ab............. Mili hi Nahi Iss Rocky ko Uski Reena Koi 🤭

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

      @@Eclipso619 mil jye ge bro don't worry Allah de ga

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

      @@Chaudharyhammad Accha ........ Meri Tamanna Puri Ho To Fir........ 🥰🥰🥰 Dua me Yaad Rakhna 🤟🎯🤟

  • @LearningStudents-i9y
    @LearningStudents-i9y 10 месяцев назад +2

    Sir Asslum-o-alikum , I like your lectures , so Sir plz made lectures on information security.

  • @rishusingh1995
    @rishusingh1995 4 месяца назад

    great explanation 🙏🏻

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

    great explaination

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

    842K 😍
    On the way to 1M🎉🎉
    Party Karna hainnnnnn sir jiiii 1M hone par...🎉🎉🎉

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

      Where r U from.............. Brother,
      Bangladesh Maybe 🎭

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

      @@Eclipso619 Yeah Right I'm from BD!

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

      Yes true ❣️❣️

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

    hats off💕 love from pakistan

  • @shreyanshjain2135
    @shreyanshjain2135 Год назад +2

    Welcome😊

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

    Thank you so much

  • @shahabkhan1765
    @shahabkhan1765 Год назад +2

    nice sir

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

    Sir aapkaIntro song kisi aur website ka bahaut yaad dilata hai

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

    happy teachers day sir

  • @dr.amandeep6752
    @dr.amandeep6752 2 года назад

    My all colleagues and students follow u

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

    Wow sir Aap great Ho Aap ka asan kaise chukaye sir

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

    Concept Clear

  • @MuskanKaur-lh3ig
    @MuskanKaur-lh3ig Год назад

    well explaind

  • @Neosam01
    @Neosam01 7 месяцев назад

    bohot badhiya

  • @robayatrafsun102
    @robayatrafsun102 9 месяцев назад +1

    how will it work if the rang is N and there is certain amount of inputs ..??

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

    I am unable to get videos where time complexity is explained for Counting Sort and Radix Sort
    Sorting explanation is awesome please help to get related other vides

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

    please add some content and algorithm with it related topic

  • @dragonhot6951
    @dragonhot6951 10 месяцев назад +1

    how will this works for negative numbers

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

    Radix sort i thought very diffcult see ur videos beautiful

  • @EzioAuditore-vr1oy
    @EzioAuditore-vr1oy Год назад +1

    There are another couple of steps that make this algorithm stable.

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

    First Comment
    Great as Always 👍

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

    mast algorithm hai

  • @harshsha0562
    @harshsha0562 15 дней назад +1

    Sir u r great 💗🫶

  • @Vikatuofficial
    @Vikatuofficial Год назад +2

    video starts at 0:40 sec

  • @vyrsh0
    @vyrsh0 4 месяца назад

    this is different counting sort algorithm, but if we are getting marks in exams, then its good ig.

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

    thankyou sir

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

    forgot about posting radix sorts time complexity details.

  • @Bazriya-p1f
    @Bazriya-p1f 9 месяцев назад +5

    Sir hum apne junior ko suggest krte h aapki videos k liye but sir Hume aapke chhenal ka sahi s name yaad ni hota h ....plz name change krai chahe kol gate hi rakh lo😂

    • @GateSmashers
      @GateSmashers  9 месяцев назад +5

      “Varun Singla” name se share kar diya karo..

    • @Bazriya-p1f
      @Bazriya-p1f 9 месяцев назад

      Ok

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

    1st Comment............. 🤭
    You Rocks Sir 🔥🎯🔥

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

    Legends watching at 11:18 AM 🔥🔥

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

    Good to see KL Rahul move to teaching line after his constant failures for India. 😊

  • @Seerat_-ns5ih
    @Seerat_-ns5ih Год назад

    Sir, if we have 10,25,22,15,18,21,24
    Then what will be its range? And plz reply it's important

  • @palanikumar4997
    @palanikumar4997 5 месяцев назад +3

    you are approaching one format okay your element range 0 to 9 only. but your approach never works all times. A=10, 8, 12, 9, 10, 11, 12, 10, 9, 8 this series never works your approach I can challenge you
    [23, 12, 34, 18, 25, 23, 19, 20, 18, 23], [2,1,1,0,2,5,4,0,2,8,7,7,9,2,0,1,9]. you fix the range 0 to 5 only. how is it possible these series?

    • @udayrajsingh8235
      @udayrajsingh8235 21 день назад

      rewatch the video..its same as hashing

    • @CAthishKumar
      @CAthishKumar 20 дней назад

      He said it works if it's in range , here he fixed the range as 5 hence it worked

  • @Voltage-ee4vd
    @Voltage-ee4vd 4 месяца назад

    space complexity will be O(n+k) na!

    • @Akshita-k1z
      @Akshita-k1z 2 месяца назад

      its a time complexity not space complexity

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

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

    I have a question...
    Why we write time complexity as O (n + k) always instead of writing actually values?
    Is tarah to har counting sort ki yehi time complexity hogi?

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

      Yes, har counting sort ki yehi time complexity hogi. As Time complexity is a general association of an algorithm's worst case time to the input.
      Agaar n barega, to time bhi barega. Lekin time kitna barega relative with n, vo ha time complexity. Yahan time linearly n ke saath bar raha ha. O(n).
      Allag algorithms ki time complexity allag ho sakti ha, jaise bubble sort ki O(n^2).

  • @Disruptivetechnology-s6x
    @Disruptivetechnology-s6x Год назад

    OG Varun Singla

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

    Ciao @Varun Bhai, please rectify this video of yours. It's misleading.

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

    What if array contains 0 or negative value.

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

      For 0 it will work, but not for negative numbers as indexs are not negative

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

    (N+K) or (NxK) ?

  • @mycollegeLife.
    @mycollegeLife. Год назад

    where is redix short next video sirji?

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

    Subscribers bhut jarrori hai 🦾

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

    completedgoodvibes

  • @cool-vv5hk
    @cool-vv5hk Год назад

    Sir pls send sell sort video link

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

    people have put half an hour videos to explain this simple concept. 5 mins are more than enough.

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

      bhai glt pdha diya h 5 min k chkr m🤣

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

      @@amannegi8425 ohh, kya error h?

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

      @@wisdomkhan this method only work for small integer.. But cannot be used as general purpose algo for sorting object with multiple members.

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

    Legends are watching it at 12.53 am 😊

  • @SanketSharmasanket7317
    @SanketSharmasanket7317 3 месяца назад +1

    ok

  • @dhruvtomar9788
    @dhruvtomar9788 9 месяцев назад +1

    Sir aap college exam , interview , competitive exam bol dete ho isliye jadatar bachhe dekh lete video 😂

  • @amanmalik2081
    @amanmalik2081 7 месяцев назад +1

    Paid courses se better hai yeh

  • @AnshuPatel-m2r
    @AnshuPatel-m2r Месяц назад

    1:20

  • @statusvibz
    @statusvibz Месяц назад +1

    Are you teaching wrong or what???
    How can someone explain in such an easiest way ....☺

  • @MadhuKumari-pz2jo
    @MadhuKumari-pz2jo 2 года назад

    Pgt haryana ki tyari kra do c and c++

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

    Mujhe pta ha cs walo tm b dekh rae ho comment krna😂

  • @SALMANREALBEAUTY
    @SALMANREALBEAUTY 11 дней назад

    Subscriber bahut zaroori hai

  • @RahulSingh-z2t5l
    @RahulSingh-z2t5l 4 месяца назад

    rahul dua

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

    🙏🙏🤗🤗

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

    This method is not correct sir correct it

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

    dont speek subsribers bahut jaroori hai as we all know you are paid on the basis of subscribers

  • @SIDDHANTRAAJ-q2h
    @SIDDHANTRAAJ-q2h Месяц назад

    17/09/24 :)

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

    bro why your video look like an english video but it's not? downvoted..

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

    bhai tum lalchi bhot ho

  • @SIDDHANTRAAJ-q2h
    @SIDDHANTRAAJ-q2h Месяц назад

    17/09/24 :)