Menu
Coddy logo textTech

Final Challenge #1

Lesson 8 of 9 in Coddy's Insertion Sort - DSA Series course.

challenge icon

Challenge

Easy

Modify your Insertion Sort implementation to sort the array in reverse order (from largest to smallest).

Make sure to print the sorted array at the end of the function, element by element, with a new line in between.

Try it yourself

#include <stdio.h>

void insertionSort(int* arr, int n) {
    // Write code here
}

All lessons in Insertion Sort - DSA Series