
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Learn how binary search finds a key in a sorted array by comparing it to the middle element and halving the left and right halves, revealing logarithmic complexity.
Explore recursive implementation of binary search, using array, key, and first and last indices, with base cases returning index or -1 and left or right recursive calls.
Demonstrate bubble sort by comparing adjacent elements, swapping when out of order, and moving the largest element to the last position across passes to sort an array in ascending order.
This lecture demonstrates bubble sort with a numeric example, showing comparisons and swaps that move elements toward increasing order, placing the largest element at the end after the first pass.
Implement the selection sort algorithm in C++ by writing a swap function, using three indices to find the minimum element, and swapping at the end of each pass.
Explore count sort, a linear-time sorting method that uses a frequency array to count occurrences and reconstruct the sorted output, best for small, limited ranges like ASCII.
Implement radix sort in C++ by distributing numbers into digit-based buckets and performing multiple passes using powers of ten to extract digits, driven by the maximum value's digit count.
Hey there! In this course on searching and sorting algorithms. We will be visualising the workflow of the algorithms and understanding the hang of them. We will implement what we have understood in Cpp Programming. We will compare and contrast each algorithm in terms of time, space, adaptability and stability.
The searching algorithms that we will be studying in this course are
1. Linear Search
2. Binary Search - Both Recursive and Iterative
3. Jump Search.
The sorting algorithms what we will be looking in this course are:
1. Bubble Sort
2. Selection Sort
3. Merge Sort
4. Quick Sort
5. Count Sort
6. Bucket Sort
7. Radix Sort
8. Insertion Sort
You'll be able to understand the typical use cases, workflow, time complexity, implementation of each and every algorithm.
A sorting algorithm is an algorithm that puts elements of a list in a certain order. The most frequently used orders are numerical order and lexicographical order. Efficient sorting is important for optimizing the efficiency of other algorithms (such as search and merge algorithms) that require input data to be in sorted lists. Sorting is also often useful for canonicalizing data and for producing human-readable output. More formally, the output of any sorting algorithm must satisfy two conditions:
The output is in nondecreasing order (each element is no smaller than the previous element according to the desired total order);
The output is a permutation (a reordering, yet retaining all of the original elements) of the input.
For optimum efficiency, the input data in fast memory should be stored in a data structure which allows random access rather than one that allows only sequential access
[UPDATE - 13th of July, 2025] - Added the SDE Finding the First Bug Problem (Interview Question)
[UPDATE - 13th of July, 2025] - Added one coding exercise (Interview Question)