Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Latest commit

 

History

History
executable file
·
20 lines (9 loc) · 383 Bytes

Insertion_Sort.md

File metadata and controls

executable file
·
20 lines (9 loc) · 383 Bytes

Insertion Sort

Problem Statement

Write a function that takes in an array of integers and returns a sorted version of that array. Use the Insertion Sort algorithm to sort the array. Sample input: [8, 5, 2, 9, 5, 6, 3] Sample output: [2, 3, 5, 5, 6, 8, 9]

Explanation

We can use a Stack here

Solution

Check this Python code.