Python Tutorials - Bubble Sort Program

Поделиться
HTML-код
  • Опубликовано: 14 дек 2024
  • In this Python programming video tutorial we will learn about bubble sort program in detail.
    Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong order. The pass through the list is repeated until no swaps are needed which indicates that the list is sorted.
    The algorithm which is a comparison sort is named for the way smaller or larger elements "bubble" to the top of the list. Although the algorithm is simple, it is too slow and impractical for most problems even when compared to insertion sort. Bubble sort can be practical if the input is in mostly sorted order with some out-of-order elements nearly in position.
    Here we are writing the program using bubble sort algorithm.
    Selection Sort Algorithm And Program:
    • Python Tutorials - Sel...
    • Python Tutorials - Sel...
    • Python Tutorials - Sel...
    • Python Tutorials - Sel...
    Bubble Sort Algorithm:
    • Python Tutorials - Bub...
    #PythonProgramming #BubbleSort
    For more free tutorials on computer programming
    / amulsacademy
    / amulsacademy

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

  • @syedalikhan5173
    @syedalikhan5173 5 лет назад +60

    I am telling you i have watched several videos on bubble sort none has explained better then you full marks. i am totally impressed. Surely i will recommend all my friends. Best Python tutorial on any channel

  • @yasmeenkarachiwala9612
    @yasmeenkarachiwala9612 5 лет назад +21

    Amazing for people from non programming background trying to learning coding.
    You make sure the concept is understood.
    You have earned my subscription. Please keep doing this amazing work.
    Loads of Love from San Francisco!!

  • @stringswithakshat3405
    @stringswithakshat3405 5 лет назад +18

    when you teach,,, each and every time I fall in love with python... thank you .. for your dedication 🤗🤗

    • @AmulsAcademy
      @AmulsAcademy  5 лет назад +2

      Thank you :)

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

      @@AmulsAcademymam also make videos on dynamic programming, brute force ..... asap

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

    When I watched other videos I was having difficulty understanding the optimization part. Finally I got it from your video. Thank You. Loved it.

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

    I struggled with this part so much. You are the only one who explained it so perfectly.

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

    the most perfect explanation I've seen for bubble sort. thank u so much. i will definitely follow your channel from now on.

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

    Best programming channel out there , nothing can beat the tutors explanation.

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

    What an explanation ability you have got, brilliant, amazing and outstanding. Totally excellent experience for those who are beginners in Python programming. I am your huge fan, no doubt I have subscribed you. Keep up the good work, Amulya. I really appreciate your work.

  • @saravananraja8615
    @saravananraja8615 6 лет назад +2

    If anyone asks me to suggest the best python tutorial youtube channel, I will suggest this channel only. Your Interpretation is in a good way.

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

      Thank you:)

    • @kemhor277
      @kemhor277 6 лет назад +2

      @@AmulsAcademy Bravo I hope you will do lessons about Data Structures. Thanks for the good job !!! 👏👏👏👏👏

  • @asifsiddique7543
    @asifsiddique7543 5 лет назад +4

    Masha Allah!!! incredible depth of knowledge ...stunning ability to teach ...10 out of 10

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

    seriously the quality of knowledge i get is far better any other video

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

    Flawless explanation mam thanks a ton for your crystal clear explanation

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

    Amulya's Academy is so good at teaching. It explains everything easily that anybody can understand. Also, the way of teaching also amazes me. I am happily going through my "Data Structure" course from "Amulya's Academy" and this helps me a lot in my studies as a CSE student. Moreover, I have recommended my friends sharping their knowledge from this channel. Thank you so much and Love from Bangladesh!

  • @jayasreenelluri7029
    @jayasreenelluri7029 5 лет назад +9

    Ur amazing and ur teaching was excellent keep going and make more videos ......☆☆☆☆☆

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

    thanks a lot you just helped me out. I've been searching for the most basic one as I don't really have any background knowledge of coding. Finally, i found my savior. Thanks a lot. I'll be willing for the rest related to python too.

  • @TheTeenKitchen
    @TheTeenKitchen 5 лет назад +4

    Thank you so much mam... tomorrow is my practical exam and I luckily found this one...😊😊😊

  • @deutschnacharabischemgeschmack

    Best explanation so far on bubble sort. God bless you. Thanks

  • @Shashikantyadav-tm9ix
    @Shashikantyadav-tm9ix 5 лет назад +1

    I have seen many tutorial but not understood.
    This vedio really amazing to understand.

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

    I have no idea why people have disliked the video. I don't have to repeat the video or search for another source to understand

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

    Well done, best explanation for the vague . it's easier than the others when you explain something, GO ON.
    Thank u

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

    A fantastic, well articulated video explaining bubble sort. The python solutions and the variations of what the code can do is very informative.
    Many thanks

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

    your explanation is smooth and steady

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

    Wow , you have explain it in simple way and in-depth . Thank you sooo much .

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

    आपके जैसी वीडियोस एक्सप्लेनेशन किसी के नहीं देखे कुछ और सिंपल सी ,सी प्लस प्लस में जैसे प्रोग्राम करवाते थे वैसे पाइथन के बनाये क्योंकि राजस्थान बोर्ड में पहली बार पाइथन प्रोग्रामिंग लैंग्वेज लगी है 11th एंड 12th में

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

    No words😳.....Thanks a lottttt buddy and plzz keep on uploading so that it can help USS😅 to understand programing

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

    Jo Jo lockdown main madam ki videos dekh raha hein like karooo ... Your's teaching makes python into an another Animal ... Plz keep it up madam.. 😍😍😍😍

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

    There is no word to explain. Suuuuuperb mam

  • @snowkey7186
    @snowkey7186 6 лет назад +2

    underrated yt channel

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

    your teaching way very efficient. Thank you for this video. You give your best while teaching any topic.

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

    Amazing explanation and pls make more videos on different algorithms in python like greedy algo, BFS, DFS etc

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

    best teacher in the universe thank you

  • @019-karpagams2
    @019-karpagams2 2 года назад

    You are a great teacher madam ,we need more of your videos!!!!

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

    Your explanation is very clear.....I like your video

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

    Mam really explained very well..I enjoyed writing program's

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

    Best explanation ever.

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

    Your all videos are very much helpful and you make it look simple 😊😊😊

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

    Mam ur explanation was so nice it is easy to understand keep rocking like this mam

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

    Nice explaination and awesome voice 😍😍
    Thanks for making videos on python

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

    What is the difference between Selection Sort and Bubble Sort ? In both sorting techniques we can do both ascending and descending.

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

      Each and every sorting technique allow us to sort list of numbers in ascending as well as descending order, but each technique has its own way of sorting or working.
      we can say algorithm of each technique is different.

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

    Amazing ...... Wow fantastic ....Thanks & Love u ....

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

    best and amazing explanation

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

    Awesome ma'am btw are u from south India?

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

    Really good explanation

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

    Mam, program is working extremely fine but any other reason for not using else in loop - only if condition we mentioned.

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

    Very great explanation.

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

    For user input we can use the split method:
    array=list(map(int,input().split())).

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

    Really awesome great video.

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

    Hii sista...Will there be any different swapping Method??I mean by doing same code in while loop

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

      Yes you can use third variable to swap 😊
      a=10
      b=5
      temp=a
      a=b
      b= temp

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

    Amulayaji, you explanation is very simple and full informative related to that particular topic 👌🙂...Could you please provide me your complete series of Python learning from beginning to end 🙏

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

    Please tell me, how to show the status after any iteration like after 3rd iteration, 2nd iteration

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

      w=1
      list1 = [10,15,4,23,0]
      for j in range(len(list1)-1):
      print("iteration",w)
      w=w+1
      for i in range(len(list1)-1):
      if list1[i]>list1[i+1] :
      list1[i], list1[i+1] = list1[i+1], list1[i]
      print(list1)
      else:
      print(list1)
      print()
      #w=w+1
      print ("Sorted list is:")
      print(list1)
      :)

  • @Playstore-zc5xk
    @Playstore-zc5xk 4 года назад +1

    I love your explanation mam. You are more than awesome

  • @chandramouli5469
    @chandramouli5469 5 лет назад +2

    Great work, keep going !!!

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

    such a great explaination

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

    How to think logic any program?

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

    You're doing great. Mam' ,V well explained.

  • @MuhammadIbrahim-uc1nc
    @MuhammadIbrahim-uc1nc 4 года назад +1

    i want to sort a array string like {"Man","cda","zyx"} to {"amn","abc","xyz"} please help me i want it algoritium

  • @SaifKhan-wm9db
    @SaifKhan-wm9db 3 года назад +1

    easily understandable thank you so much

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

    could you please tell me deference to use for loop range function or without range function ? for I in range(Len(are)) why we use range and Len function without it we also get index

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

    pls mention complexities and minimum number of swaps are required

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

    ValueError: invalid literal for int() with base 10: '4,3,2'
    how to solve this error?
    plz suggest me

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

    thank you so much mam

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

    I tried the exact same staments but the output doesn't come please help me!!!!

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

      Give me the program i will check :)

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

    Your 2nd for loop is running n-1 times ... so if I put an input in descending order it will give wrong output.... and if I run that loop n times, it works.
    Please tell me if I am anywhere wrong.

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

    I need a program to sort alpha numeric list in python programming

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

    Very nice. Thank you.

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

    ValueError: invalid literal for int() with base 10: '4 3 2 1'
    this error occurs when using this program
    plz...suggest me how solve this error

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

    Osm explanation ❤❤❤

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

    can we break the for loop after the iteration in which no swap happened. That might reduce the execution for long list. Please let me know if I am getting it wrong way.

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

    Wow what a explanation

  • @sushilkumar-ef7gh
    @sushilkumar-ef7gh 6 лет назад +2

    please upload quick sort algorithm as it is being asked in so many interviews...

  • @Rakesh-fc1wr
    @Rakesh-fc1wr 5 лет назад +1

    Can you give or explain bubble sort program Using while loop using a function amulya ..??

    • @AmulsAcademy
      @AmulsAcademy  5 лет назад +4

      def bubbleSort(l):
      i = 0
      while i

    • @Rakesh-fc1wr
      @Rakesh-fc1wr 5 лет назад

      @@AmulsAcademy thanq amulya ..Tq

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

    Awesome maam ! maam when will we get BFS algorithm in DS series ? 😍

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

    This is freaking great. Thank you very very very much!

  • @SonuRaj-er1hn
    @SonuRaj-er1hn 4 года назад

    It's really good, can you make all algorithm and data structure videos it's very helpful for everyone, Thank you very much

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

    Very good explaination..plz make a tutorial on matrix chain multiplication

  • @ankitshukla5800
    @ankitshukla5800 5 лет назад +2

    Ma'am really a good videos thank you

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

    thank you for good explanation

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

    Very Cool!!👍👍

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

    Thank you Amulya ❤️ Love you help me to crack interview

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

    Bohat sahi hai bhai

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

    Please make videos on algorithms in python

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

    Well Explained.
    What all changes are needed if we are writing this as a function. For reducing the iteration steps and to show all the swapping steps.
    def bubble_sort(n):
    for i in range(len(n)-1):
    if n[i]>n[i+1]:
    n[i],n[i+1]=n[i+1],n[i]
    bubble_sort(n)
    n=[100,120,900,400,800,10000000,12,1,6,300,21,10000]
    bubble_sort(n)
    print(n)

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

    You killed it.

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

    Well explained

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

    In bubble sorting compare starts from starting and this sorting is of insertion sorting

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

      Step 1 − If it is the first element, it is already sorted. return 1;
      Step 2 − Pick next element
      Step 3 − Compare with all elements in the sorted sub-list
      Step 4 − Shift all the elements in the sorted sub-list that is greater than the
      value to be sorted
      Step 5 − Insert the value
      Step 6 − Repeat until list is sorted
      Insertion sort algorithm
      :)

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

    Plss..upload a video on insertion and merge sort

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

    very help full

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

    Excellent

  • @dharanidharb6451
    @dharanidharb6451 5 лет назад +2

    Upload the code in comment or description

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

    Ma'am, How to create game in python?

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

    Do you know CodeWithHarry?

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

    In python programming
    List=[130,180,120,80,60]
    Output:
    Height order of students before sorting:
    130 180 120 80 60
    Height order of students after iteration 1
    130 120 80 60 180
    Height order of students after iteration 2
    120 80 60 130 180
    Height order of students after iteration 3
    80 60 120 130 180
    Height order of students after iteration 4
    60 80 120 130 180
    Final sorting of students in a bench are:
    60 80 120 130 180
    Please reply and solve this problem mam

  • @anjaliagrahari1832
    @anjaliagrahari1832 10 месяцев назад

    Thanks a lot ma'am....

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

    Please do the video regarding chapter wise of cbse

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

    You are just awesome, How old are you ?

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

    Best video

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

    you are wonderful!!

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

    Can't understand that 5 input step

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

    thank you

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

    Thanks a lot