Your First Step To Understanding Algorithms

Sdílet
Vložit
  • čas přidán 9. 07. 2024
  • Bubble sort is easy to understand and simple to implement. This is good because... it is the entry point for learning about sorting algorithms! It gives us an easy opportunity to see how to increase the performance of our code by just making a few changes. If you want to increase your knowledge of computer science, algorithm theory, or just take a look in a new direction, bubble sort leads to a massive field of theory that will challenge you and improve your skills. Merge sort, quick sort, insertion sort, heap sort, etc. Hit that subscribe button and don't miss an Algorithm Monday or CS Thursday video!
    Algorithm Monday playlist: • Algorithm Monday
    Algorithm Monday Code: github.com/robertbunch/algori...
    CS Thursday playlist: • Computer Science Thurs...
    Radix Sort - • Python Radix Sort Tuto...
    0:00 - Why sorting algorithms matter
    4:10 - How bubblesort works (whiteboard)
    8:27 - Pseudocode
    10:30 -3 optimization considerations
    12:09 - Big O - O(n^2)
    13:02 - Python implementation
    17:11 - Optimization 1
    19:03 - Optimization 2 - better inner loop
    21:11 - Optimization 3 - In order list
    23:10 - Code review
  • Věda a technologie

Komentáře • 6

  • @kazmi401
    @kazmi401 Před 3 měsíci +1

    Really Thankful Dear Rob. please don't stop videos on algorithms, clear all sorting first then move on to other algorithms as well. So I learned Bubble sort. Thanks again. 🙏 I will never miss Monday and Thursday. I wish i had a teacher like you throughout my Life.

    • @robertbunch-dev
      @robertbunch-dev  Před 2 měsíci

      Really appreciate the comment. I confess, there are a lot of days I don't think anyone watches Monday or Thursday, but this is how building a community works. Starts small and if the value is there, people, however many, will gather and appreciate it. I will hit all of the main sorting algorithms over the next few months! Thanks for watching/commenting and keep learning.

  • @vatichild
    @vatichild Před 3 měsíci +1

    Thank you for putting in the effort for a small audience. I hope you gain more subscribers quickly. Your content is quite unique for developers.

    • @robertbunch-dev
      @robertbunch-dev  Před 2 měsíci +1

      Small audience, but big heart :) Hopefully it can help more people, but I really appreciate you noticing the effort. Either way, it's worth it! Thanks for watching/commenting, and keep coding.

  • @ahmad-murery
    @ahmad-murery Před 3 měsíci

    I remember I needed to do sorting on one of my MSX1 BASIC program and I came up with what I thought was a good solution including all the optimizations you mentioned, fun fact is I didn't know it was called bubble sort.
    The good thing is MSX BASIC has it's own SWAP instruction so no need to use a temp variable.
    That was sort of a fun video 😁👍
    Thanks Rob!

    • @robertbunch-dev
      @robertbunch-dev  Před 2 měsíci +1

      Always nice when the language has done some of the work for us! It's always (in spite of our best efforts) going to be more efficient.