We’ve reached the last topic of my five part sorting algorithm series! Today, we finally cover Quick Sort — the most popular of the five sorting algorithms. If you haven’t gotten the chance to review the first four sorting algorithms yet, no worries — we can start fresh here. All you need to know going into this is the the concept of recursion.
If you’re down for a quick recap of all we’ve done so far, here’s one below:
Let’s do a brief recap of the first three and then we’ll jump right into Merge Sort.
I’m currently doing a five part series for sorting algorithms, but decided to take this slight detour to explain recursion. I’m doing this because my next, and final two topics in my sorting algorithm series, will incorporate recursion within the algorithm. So, understanding recursion is indeed, relevant.
Recursion is a method of solving a problem where the solution depends on solutions to smaller instances of the same problem. It is a common technique used in divide and conquer algorithms (such as Merge Sort).
In recursion, the function will call on itself until it doesn’t anymore. The condition where it stops…
For those who’d like a quick review — Bubble Sort finds the biggest unsorted number in each iteration and moves it to the end of the array. Meanwhile, Selection Sort finds the smallest unsorted number in each iteration and moves it the the beginning of the array. This is a bit oversimplified, but outlines the biggest difference between the two.
Much like Selection Sort where a ‘marker’ is used to keep track…
Hello, again! In today’s post I will be reviewing the sorting algorithm, Selection Sort. This is part 2 of my five-part sorting algorithm series. If you missed the first part on Bubble Sort, you can find a link to that article here. You don’t need to have background knowledge on Bubble Sort to understand today’s topic though, so don’t feel obligated to backtrack.
I’ve added a quick performance comparison of Bubble Sort and Selection Sort at the end of the article. Feel free to skip it if you aren’t familiar with Bubble Sort yet.
As for those who want a…
One of the most daunting things I find about coding tech interviews is the heavy emphasis on Data Structures and Algorithms. Perhaps it’s because I’m coming from a bootcamp background, and it wasn’t heavily touched upon — but no matter who I speak to (computer science degree holders or not), it’s a heavily tested subject and a must know for interviews.
As such, I’ll be covering the five most popular sorting algorithms in this five part mini series. Today, I’ll be reviewing bubble sort, with selection, insertion, merge and quick sort to be covered in subsequent posts.
If you’re ready…
You’ve just finished building your project and you’re ready to show it off to the world. It’s fully deployed, and it’s as easy as sharing the link now and LinkedIn is your first stop — but something’s off… uh, oh!
ChartJS is a free open-source JavaScvript library for data visualization. It supports eight chart types and renders in HTML5 canvas.
I recently used ChartJS in a fun Workout App where users can log and track their progress in relation to their weight, BMI, and the number of reps logged per body type category. Without charting, the data would have looked dry and exhausting. …
“Learn Once, Write Anywhere”
You may be familiar with this tagline if you’ve already been introduced to React. If not, you’ll come to learn that one of the best features behind React is its compatibility between different environments.
Much like its web browser counterpart, React…
In Mod 1, we briefly touched upon Regex — and by briefly, I mean, one of the optional labs brought it up once and I never quite saw it mentioned again.
At that time, I tried researching the logic and syntax behind it but I was so intimidated when I saw the bundle of what seemed to be random characters in every explanation. Now that I’m in Mod 2, and a little more comfortable with the terminology and in reading code, I decided to tackle this once again.
Regex, also known as Regular Expressions, is a sequence of characters that…
Full Stack Software Engineer