Skip to content

Insertion Sort, Merge Sort, Implementation of Matplotlib to show space time complexity in Python Programming Language

Notifications You must be signed in to change notification settings

Aaronwins/Sorting-and-Searching-Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Sorting-and-Searching-Algorithms

Insertion Sort, Merge Sort, Implementation of Matplotlib to show space time complexity

Objectives for Insertion Sort Code: NOTE: It does take some time for runtime as values of n till 1000 since it takes more runtime for values of n up to 50,000

  1. Given a random array of size n sort implement insertion sort.

  2. Use the time module in Python or equivalent to time how long it takes to sort an array of n=100, n=10,000, n=100,000, n=1,000,000.Make a plot of runtime vs size n. How would describe the general shape of the graph? How does it compare to what we discussed in class? (hint: you may need more points to get a better picture of the time complexity)

  3. Modify insertion sort to sort the elements in an array in descending order

  4. Modify insertion sort to sort alphanumeric values

About

Insertion Sort, Merge Sort, Implementation of Matplotlib to show space time complexity in Python Programming Language

Topics

Resources

Stars

Watchers

Forks