Chitresh-code / DSA_Worksheet

Worksheet posting DSA problems every day for GNIOT Students to solve and create PR's.
MIT License
17 stars 33 forks source link

Insertion Sort #48

Closed BEAST-PRINCE closed 1 year ago

BEAST-PRINCE commented 1 year ago

❗Write Code in Only One Language (CPP, C, Java, Python)

Give File Name : βœ… In respective language folder

πŸ“‘ DESCRIPTION

Perform Insertion Sort on a given array of integers.

Difficulty

Problem Statement: Given an list of integers you need to sort them in ascending order using the Insertion Sort method.

Input Format:

The first line of input will contain N integers separated by a space.

Output Format:

Output should be a list of sorted integers separated by a single space

Sample Input 1

15 12 6 10 8

Sample Output 1

6 8 10 12 15

Sample Input 2

89 45 65 12 10 0

Sample Output 2

0 10 12 45 65 89

To understand what is Insertion sort refer the below link: https://www.geeksforgeeks.org/insertion-sort/

Mohitraut07 commented 1 year ago

assign me

BEAST-PRINCE commented 1 year ago

Assign this to me please. I've already made a PR for the same. Thank you.

lilmistake commented 1 year ago

Issue solved by https://github.com/Chitresh-code/DSA_Worksheet/pull/53 https://github.com/Chitresh-code/DSA_Worksheet/pull/51 and https://github.com/Chitresh-code/DSA_Worksheet/pull/49