Linear search is a simple searching algorithm. In a linear search, you move from one item to the next in a list, checking each item to see if it’s the one you’re looking for.
Read More..Binary search is a more advanced searching algorithm that only works for sorted data. In a binary search, we’re cutting our search area in half each time.
Read More..In bubble sort, we compare items in pairs, moving the larger one to the right so it bubbles to the top.
Read More..If you had a look at bubble sort already (and if you haven’t, I encourage you to have a look), you might be wondering: why did we bother to compare each pair of dolls, one pair at a time? Why didn’t we just search through the whole list to find the the smallest doll, then […]
Read More..Following selection sort and bubble sort (which are worth jumping back to if you’re new to this series and also new to algorithms!), there’s a third basic method of sorting that we have yet to explore: the insertion sort. With the insertion sort, rather than going pair-by-pair and swapping like we did with bubble sort […]
Read More..Now that we’ve had a look at some of the more basic sorting algorithms (bubble sort, selection sort, and insertion sort) which might be OK for smaller datasets but aren’t super efficient in general, let’s start to have a look at some of the more advanced algorithms for sorting. These algorithms (including merge sort, quick […]
Read More..Here’s a cheat sheet for some of the vocabulary we’ll be using to talk about algorithms. You don’t need to know these things to understand the general concept of how the algorithm works, but if you’re interested in how they work programmatically, it will help to know these. Pseudocode: code that doesn’t really work, but […]
Read More..Algorithms for All is an accessible guide to algorithms written for anyone who wants to understand algorithms a little better, regardless of whether they have experience with software development or computer science! Unlike the numerous guides to algorithms which already exist on the web, this guide does not seek to explore algorithms solely from the […]
Read More..