Skip to content

Repository for Comparison based sorting algorithms in python. This was implemented for project one submission for ITCS 6114 Data Structures and Algorithms under the guidance of Dr. Dewan at the University of North Carolina at Charlotte, Fall 2021.

gadgil-devashri/Sorting-Algorithms-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Sorting Algorithms

This repository contains python code for comparision based sorting techniques such as

  • Insertion Sort
  • Merge Sort
  • Heap Sort
  • In-Place Quick Sort
  • Modified Quick Sort

SortMain class is the main entry point and calls all of the above mentioned sorting algorithms in order to analyze their performance.

Following are the instructions to run python implementation of comparison-based sorting algorithms.

  • Unzip the source code package
  • Install Python3 and python package installer which is pip
  • Install MatPlotLib package for plotting graphs using pip
  • Open the code in IDE and make sure there are no errors seen in import statements
  • Go to the command prompt, navigate to the source code directory
  • Run the command: py SortMain.py
  • Enter the input size of your choice. The code is tested for below input sizes 1000,2000,3000,50000,10000,20000,30000,40000,50000,60000
  • Choose input sequence type. It can either be random integers, sorted sequence, or reverse sorted sequence
  • Code will generate an input sequence based on the end user’s preferences. All sorting algorithms will be executed thrice. The average time taken by each algorithm will be presented as output to the end user.
  • In case you want to verify the order of the sorted output, please remove the comment for the print statements which displays the sorted sequence generated by each algorithm.
  • In case you want to verify graphs plotted, run py plotGraph.py on the command prompt. Depending on which graph you want to generate, please comment or uncomment data accordingly.

About

Repository for Comparison based sorting algorithms in python. This was implemented for project one submission for ITCS 6114 Data Structures and Algorithms under the guidance of Dr. Dewan at the University of North Carolina at Charlotte, Fall 2021.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages