Save this video free

Python (Fall 2026) Module 9-2: Creating a Sorting Algorithm

Bill Moseley, Ph.D. - Computer Science Educator · 10:55 · Watch on YouTube

Part of Bakersfield College COMP B10. See all 47 lectures and search them

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Bill Moseley explains algorithms as repeatable step-by-step procedures, then develops a selection sort by repeatedly finding the smallest remaining value and moving it to a separate list. His Python example scans a list, tracks the minimum with `intLow`, appends it to `liSorted`, and removes it from the original list until empty; the approach handles duplicates and generalizes across list sizes, provided the initial minimum value is sufficiently large.

Key takeaways

Chapters

0:00 Algorithms as Repeatable Procedures
2:00 Finding the Smallest Card to Build a Sorted List
5:00 Implementing Selection Sort with Python Lists

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:01 So an algorithm is something we use all the time.  Now if I ask you to solve this math problem, which is, you know, pretty basic. It's probably  like third or fourth grade math or whatever. We all have a method for solving  this type of math problem. Correct? So what's the first thing I do when I want  to solve this problem? The very first step. Eight. One times eight. There we go. I knew  somebody knew. So I go one times eight. I write it down here. Maybe I carry, and not  in this case. I do three times eight. Write the answer. And then I go to here. Right?  And no matter what numbers I show you here, you're going to use those same steps to solve that  same problem. So, it's an algorithm for solving

0:56 multiple digit multiplication. Would you all  agree that that same algorithm would allow me to, in theory, solve this problem as well? I can  use that same method, right? Four, seven, and I, now it's going to be ugly, right? Nobody wants  to solve this problem because you've got like, I don't know, what is that, like 15, you'd  have like 15 lines of addition down here when you're done. The odds of us getting the  answer correct are probably pretty slim, because even though each one of these is a really  simple multiplication and addition problem, there's so much of it that we probably are  going to make one tiny little error somewhere. And that's the joy of mathematics, right?  So this is the same algorithm as this. So algorithms allow us to understand different  specific problems in the same general way.

1:55 A lot of times now in computer science we  create algorithms for all kinds of things. An algorithm is just a simple, like I said, a  step-by-step procedure for solving a problem.

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

In this course

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Bill Moseley, Ph.D. - Computer Science Educator.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.