Skip to content

Implementation of insertion, bubble, quick and radix sorting algorithms in Java with analysis of time complexities

License

Notifications You must be signed in to change notification settings

derekgan08/sorting-algorithms-in-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPT212 Assignment 1: Sorting Words with Algorithms in Java

Problem Statements

Sorting is one of the most fundamental problems in computer science, essential for efficient data processing, searching, and optimization. The need for efficient sorting algorithms arises in various real-world applications such as database indexing, search engines, and data analysis systems. This project implements multiple sorting algorithms to solve the problem of ordering data efficiently in different scenarios.

Project Overview

This project implements and analyzes four fundamental sorting algorithms in Java: Insertion Sort, Bubble Sort, Quick Sort, and Radix Sort. The algorithms are applied to a list of English words, sorted in lexicographic order, and the performance of each algorithm is analyzed in terms of time complexity across best, worst, and average cases.

Key features of this project include:

  • Sorting algorithms implemented in Java.
  • Counting of primitive operations to analyze algorithm performance.
  • Experimental data and visualizations (e.g., plots of time complexity).
  • Object-oriented practices such as function encapsulation and appropriate class design.

The project also compares the runtime of different sorting algorithms based on varying input sizes and datasets, offering insights into the efficiency of each algorithm.

Key Features

  • Insertion Sort: A simple, efficient algorithm for small datasets. Best for nearly sorted lists.
  • Bubble Sort: A basic algorithm known for its simplicity, but inefficient for large datasets.
  • Quick Sort: A highly efficient divide-and-conquer algorithm with an average-case time complexity of O(n log n).
  • Radix Sort: A non-comparative sorting algorithm particularly useful for sorting words or integers with a fixed number of digits.

Each algorithm includes a counter for primitive operations and experimental plots demonstrating the best, worst, and average-case time complexities.

Technologies Used

  • Java: Core language for implementing algorithms and object-oriented principles.
  • IntelliJ IDEA: The Integrated Development Environment to complete this project.

Installation

This project is not open for public cloning or redistribution without prior written permission from the author as stated in LICENSE.md. If you would like to access this project, please reach out to the repository owner to request permission.

Once written permission is granted, you will receive detailed instructions on how to install and run the system, including all necessary steps and dependencies.

Usage

Similar to the installation process, usage instructions will be provided only after written permission is granted to access this repository. Upon receiving access, you will be provided with step-by-step instructions on how to use this system/application, including on how to run the program, interact with it and exploring all the key features stated.

About

Implementation of insertion, bubble, quick and radix sorting algorithms in Java with analysis of time complexities

Topics

Resources

License

Stars

Watchers

Forks

Languages