We saw in the last lesson the amazing applications of searching on sorted data. We realized how important structured/sorted data is such that we’re able to apply binary searching on it.

In the upcoming lessons, we will learn three strategies for sorting and their nitty gritty details.

Before we start, let’s review some important elements related to the fundamentals of arrays and their indexing,

Refresher: arrays and functions

Let’s have a refresher on arrays and how the values are passed by reference in functions.

Swap function and playing with arrays’ elements

Here is our standard swap() function:

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy