Bubble Sort in Plain English

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

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

  • @utpalbarman6125
    @utpalbarman6125 4 года назад +28

    Thanks Mosh, these topics are helpful for a quick look before any job interview, data structure is very common topic in any CS related job interview, I can still remember that I was asked about Bubble Sort in an interview, and to explain the complexity. Happy to see you code in Java.

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

      @@programmingwithmosh I searched Mosh Hamedani on LinkedIn but I didn't find you.

  • @zeloguy
    @zeloguy 4 года назад +28

    OMG I haven't heard of the Bubble Sort since college in '92!

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

    Just completed your course from Udemy and I'm in love with the way of your teaching! So glad you have a RUclips channel!

  • @alestoraldous7036
    @alestoraldous7036 4 года назад +45

    mosh is one among the best instructors

  • @umarsiddique511
    @umarsiddique511 4 года назад +8

    Mosh u r the best among all . u r the only instructor. who teaches like that. thank u.

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

      I think telusko is much better.. But also mosh is not bad

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

    for people trying to do in python :
    ```
    def bubble(arr):
    n = len(arr)
    def swap(arr, i, j):
    arr[i], arr[j] = arr[j], arr[i]
    # print('=>', arr, end=' ')
    for i in range(n - 1):
    for j in range(abs(i - n) - 1):
    if arr[j] > arr[j + 1]:
    swap(arr, j, j + 1)
    # print('j = ' + str(j))
    return arr
    ```
    hope it helps.

  • @Aryan-ly5ho
    @Aryan-ly5ho 4 года назад +2

    Mosh you are professional. You make a Quality base video in less earning 💰 . THANK YOU .

  • @silambarasan.ssethu9367
    @silambarasan.ssethu9367 3 года назад

    Hey Mosh , ur comment about this logic,
    void bubble(int[] arr) {
    int arrLength = arr.length;
    int maxSwapIndex = 0;
    while (arrLength > 0) {
    maxSwapIndex = 0;
    for (int i = 1; i < arr.length; i++) {
    if (arr[i - 1] > arr[i]) {
    swap(arr, i - 1, i);
    maxSwapIndex = i;
    }
    }
    arrLength = maxSwapIndex;
    }
    }

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

    I have done your 6 hour python course and other 2 too.
    You are the best teacher i have ever seen in my life.Hats off to you.May you see my comment.
    I have a ❓
    My django site was not found, when i cannot find it, when searched it through another mobile
    It said"error 404"

  • @feranmiafrica9528
    @feranmiafrica9528 4 года назад +12

    I'm currently taking your react native course.. you're just the best

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

      @@programmingwithmosh of course I always do

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

      @@programmingwithmosh Please create separate django course.

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

    Mosh gave me the motivation to try my own luck in being an instructor on my RUclips Channel.
    I wish I will have his calmness and perfect explaining skills just as he does.
    Lots of love Mosh

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

    thank you Mosh. It has been a great pleasure to learn from you in youtube and udemy. You are a great teacher. You make complex things so easier, I am grateful to you.

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

    Your are the beast teacher i am of 14 and from India I learn python with the help of you thankyou for help you are the beast instructer i make some programme with the help of you python corsethankyou
    very much and losts of love from India 🇮🇳🇮🇳

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

    You are amazing, I have watched and completed all of your courses. I think you are the best programmer in the world

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

      I have shared all of your videos, you are my role model (for programming)!

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

    I love your teaching .sir pls make a video on how to think for the soln of any given programming problem.

  • @AaronAsherRandall
    @AaronAsherRandall 2 года назад +14

    I’m a C# dev and I am just shocked at how similar Java is to C#. It is literally 95% the same syntactically! I guess I know Java now 😂

    • @pezznut177
      @pezznut177 2 месяца назад +1

      right??? My second language is C#; Had the same feeling when I tri3d java the first time lmao

  • @JV-gv5gz
    @JV-gv5gz 3 месяца назад

    Really really thanks, your video was the first that could explain to me this in a simple way 😅

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

    nice optimization. We also love to hear atleast one use case where it can be used practically other than in exams or interviews.

  • @sujitprabhakaran9886
    @sujitprabhakaran9886 9 месяцев назад

    Mosh has got a million dollar Smile. Just by looking at him smile makes me very happy even in my toughest of times.

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

    I had no clue you could declare variables inside your for loop. That's awesome.

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

    The best programmer and instructor I’ve ever seen!

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

    I was really stuck on second iteration.....and this video saved my brain.....
    Thanks...
    :?

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

    Wow... That's brilliant. Using array.length - i

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

    Only if RUclips were filled with such good content, it would be paradise for IT students.
    Your approach to teach is just beautiful.
    I need to ask this to you @Mosh:
    "Your opinion on PHP programming language"
    Thanks!

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

    You are the best one mr.mosh, the one of people who I want to be like is you, tnx a lot from your teachs.🤗

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

    Best experienced instructor ever!!!

  • @آلاءأحمد-غ9م
    @آلاءأحمد-غ9م 3 года назад

    Thanks a lot !
    You explained it in just 11 minutes and saved me 💙💙💙💙

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

    This was a great one Mosh, we can't thank you enough for what you do.

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

    Thanks, Mosh! This is a fantastic video that helps me understand how it is really working! I understand the bubble sort from the book, but I never knew how to code without your video!

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

    Hi mosh this is Arif Billah from bangladesh. Youre my true mentor thank you so much

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

      vai cse te poren??

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

      I am a front end web developer now I am learning back end web development by using python Django.
      I would like to be a professional software engineer. Mosh is one of my best teacher.

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

      @@arifbillahsheikh9452 Salam bahi form which vadio you learn web development in Python.

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

      you can go to playlist of this channel you will see 6 hours python cousre .

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

    Sir you are god level in programming.

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

    Hello sir .
    First of all thank you very much for your tutorial courses, I learnt a lot from them and you are one of the best instructor .
    Sir, can make a tutorial course on machine learning or a complete stack on data science.

  • @Bandit-is8zi
    @Bandit-is8zi Год назад

    I am proud of myself i menage to make my own sorting algoritham tonight and i didnt even knowing of bubble sort, i write it in c++ and after that asked in discord and actually find out that is my program actually bubble sort

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

    Thank you Professor Mosh Hamedani for the tutorials. If I were able to take your courses I would definitely grab the chances to do your coursrs.

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

    you are the best instructor has ever seen 💚

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

      @@programmingwithmosh Your welcome 💚

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

    Your are the best sir, and I got this feeling when I first saw your python course for beginners approximately 3 years ago.

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

    If only I had full access to his courses!

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

    Sir, I'm your student from Pakistan
    I love your videos so much
    sir the reason for my texting you is a request that can you please upload tutorial about web scraping with python
    i watch many videos on youtube but your method of teaching was too good i really loved it
    can you please do that for your students

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

    thank you for these incredible videos , you helped me in python and C sharp but i was wondering if you can do a video about data structure and algorithm in C++
    hope you read this comment

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

    Yes, we need more of the algorithms lectures

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

      @@programmingwithmosh already did, with my entire friends circle ☺️ thank you so much for sharing your knowledge and experience with us ☺️

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

      @@programmingwithmosh Please create separate django course. Please Mosh.

  • @siddarth_thiru
    @siddarth_thiru 4 года назад +10

    Mosh when will we get Android development tutorial. Please 😭 (it's been years)

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

    Mosh thank you for more courses am a fan

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

    Glad you optimised at the end there. Nice vid, thanks.

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

    Hi Mosh!
    Thanks for the brief and clear explanation. But I would like to suggest to use JS instead of Java. because it more general + everybody can use it even in his browser and easy to understand 😉
    however, you are amazing & kardorost😎

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

    Brilliant video, amazing teacher so far I found for teaching programming techniques

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

      @@programmingwithmosh Please mosh create separate django course.

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

    Funny how I've basically used the bubble sort algorithm my entire life, when mentally sorting lists, without ever knowing there was a name for it

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

    Sir ur tutorials are amazing plz make a one video on Django plz sir

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

    Great tutorial...Can you please explain how in best case scenario we need a single pass? Because even if array is sorted we have to loop through it to know its sorted so O(n) right?

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

    The sort of sort I was so confused about! Thanks Mosh!

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

    I wish my coding teacher explained it like that :) Nice one!

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

    Please mosh create fully separate django course. I need that. Please mosh I really like your teaching style.

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

      @@programmingwithmosh Thank you so much for your reply. I am waiting for your course

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

    Please make a full tutorial on flutter programming. We really really waiting for that tutorial from a best tutor.

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

    i reallly wanted to take your course ,, but actually its alot expensive for me to enroll now😶may be I have to look for some other alternative to learn data structures and algorithm

  • @Денис-ж3ф5р
    @Денис-ж3ф5р 3 года назад

    According to your code the scheme you showed at the beginning is wrong. Cuz index i(0) will be compared to each element in the array, then i + 1 after that comparison and so on.

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

    Make more of algorithms and data structures in java . thank you

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

      You can submit question to him on the post he creat in the community tab. You just have to feel the form with your question

  • @DeepakKumar-uz4xy
    @DeepakKumar-uz4xy 4 года назад

    Thank you mosh for this awesome explanation

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

    How do you edit your videos? please :D they are really cool

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

    I really enjoyed this Mosh, thanks!

  • @AhmedKhan-rt6oz
    @AhmedKhan-rt6oz 4 года назад

    Sir, please make whole series on DevOps

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

    sir in the 16 th line we should give static sir public static void swap(int arr[], int index1, int index2)

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

    Thanks Mosh

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

    Time for bubble sort!
    Waiting!!

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

      @@programmingwithmosh
      I liked your explanation,it was easy to grasp,
      Thank.you for the wonderful explanation ✌️

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

    if we have flag about swaped or not - can we get rid of two cycles and do only one cycle until flag is true?

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

    I love it when mosh uploads

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

    If we put a boolean status to determine if the array has been swapped, but the array we pass in initially has the first item smaller than the last item, than the status remains unchanged and returns.So if we pass in an array of [0,1,4,3,5] will the first 2 items be compared, seen as "arranged" and return immediately? please point out any flaws in my logic.Im referring to code at 10:13, thanks in advance.

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

    Plz upload these videos directly can't wait for the premier .

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

    Very clear and understandable.

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

    Great video on Bubble Sort! Super instructive 👊

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

    Hi can you please make a vedio of how to use a macbook Pro, complete ( A-Z ) guide , this would help me a lot please

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

    you are the best sir

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

    you just made it more complez

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

    Hello @ Programming with Mosh can u help me about Bubble sort at Insertion sort?

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

    i want to take your course but i can't afford as i'm only a undergraduate student. will you help me regarding this? i will work hard.

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

    Can you please show a tutorial on how you make your animations

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

    i have one question . how to protect passport jwt token ? example
    if someone get mytoken variable and copy it into other API like Postman or any other he can access fully backed user data .

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

    where can i get the part 1 of this series cause am not familiar with time complexity of algorithms??

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

    Thanks for this

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

    I will be coder inshallah sir if you upload advance Python and SQL.

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

    great explanation

  • @kirankulkarni04061993
    @kirankulkarni04061993 4 года назад +10

    When are you going to do a series on Cloud??

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

    @Mosh course price is too high $147 . Any discount or coupon available ?

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

      Shashank Pandey the course is available for $29 right now

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

      @@matthew11092 yuup got it, thank you

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

    Hi, do you think your gonna make the other parts of the java course series like intermediate

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

    Thanks

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

    please make a video on link list too on c++

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

    Thanks very much!

  • @kobe-dq3uj
    @kobe-dq3uj 3 года назад

    How about if it is descending mosh!

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

    Can you do C++ data structures and algorithms????????? Please

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

    Thank youuuu

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

    Also can you make a C++ complete oop course????????? Please, your courses are awesome 👏🏻, but you are missing the most wanted hard programming language C++, if you do that, there is more than a million C++ developers that will love ❤️ you to death!!!!!! I’ll be the first one to to subscriber!!!!!!!!

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

    Saviour is back

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

    In this case why don't we use sort() function in python?

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

      @@programmingwithmosh hey mosh I'm a fan of your lecture and tnx for replying.but i have a request can u please make a video of popular algorithms for beginners?

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

    Hello I am looking to start to learn Code, where do I start and what do you recommend i start with first. I see your course on Udemy is that where I should start? Thanks

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

      @@programmingwithmosh Okay will start over the weekend, thank you and wish me luck

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

    Plz make more videos about phyton plz... Mosh sir.... Plzzz... Make more videos

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

      Mor about class and modules I need to make perfect without any error in my programms plz..... Plz..... 🙏🙏

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

    thank you.

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

    Aww mero xama jopulu ho❣️❣️❣️❣️❣️

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

    What is the program software that you are using?

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

    Laravel
    Complete tutorial please

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

    Awesome 🎉

  • @GauravSingh-ko6fj
    @GauravSingh-ko6fj 4 года назад

    Hey! Mosh I was interested in enrolling the java course but earlier it was 10 dollar but now it is showing 29 dollar
    Please make the price again 10 dollars as I am your regular viewer and subscriber it's a humble request

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

    Why Bubblesort and not Quicksort?