Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Algorithms: Sorting and Searching!
You have completed Algorithms: Sorting and Searching!
Preview
Let's compare how long Selection Sort, Quicksort, and Merge Sort take to run on different data sets.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
That way, it'll still run the sort, but
0:00
the output won't get in the way
of our comparing run times.
0:00
Let's try running each of these scripts,
and see how long it takes.
0:04
time python selection_sort, we'll do that
0:08
one first, numbers/10,000.txt.
0:13
We combine the user and sys results,
and that gives us about 6 seconds.
0:21
Now let's try quicksort, time python
0:26
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up