Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Sort A Vector Of Integers With The Quicksort Algorithm In C++

If you’re studying computer science, at some point you’re going to be exposed to the Quicksort algorithm. Even if you’re not a computer science student, chances are this particular algorithm will come up at some point in time as part of an interview. I’ve been asked about it plenty of times in interview processes and never once used it again.

Whether or not you’ll ever use the Quicksort algorithm, it is important to know and that is what we’re going to review in this back to the basics tutorial.

In this tutorial we’re going to sort a vector of integer values using the Quicksort algorithm. We’re going to use a vector because it is a commonly used data structure in C++.

Read More

Sort An Integer Array With the Quicksort Algorithm And Java

Circling back to data structures and algorithms, we’re now going to take a look at the efficient sorting algorithm known as Quicksort.

Quicksort via Wikipedia:

Sometimes called partition-exchange sort, is an efficient sorting algorithm, serving as a systematic method for placing the elements of an array in order.

The idea behind Quicksort is to take a large array of values and divide it into two smaller arrays, doing this recursively, and swapping elements.

This is one of the fundamental algorithms you’ll learn in any computer science course. It is also a very good question that could be asked in a job interview for an engineering type position. I’m going to help you through it using Java.

Read More