Quelich / algorithm-analysis

Running time comparison of sorting algorithms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Analysis of the Algorithms

This repository includes the implementation of sorting algorithms and matrix operations in Java. It also compares the time and space complexity of sorting algorithms and matrix multiplication algorithms.

Comparison

  • Insertion Sort Average Time Complexity: O(n^2)
  • Selection Sort Average Time Complexity: O(n^2)
  • Quick Sort Average Time Complexity: O(n * lgn), Space Complexity: O(n)
  • Merge Sort Average Time Complexity: O(n * lgn), Space Complexity: O(n)
  • Merge Sort combined with Insertion Sort
  • Shell Sort Average Time Complexity: O(n * lgn), Space Complexity: O(1)
  • Heap Sort Average Time Complexity: O(n * lgn), Space Complexity: O(1)
  • Matrix Multiplication (Brute Force & Recursive)
  • Strassen's Matrix Multiplication
  • Maximum Subarray Problem (Brute Force & Recursive)
  • Count Sort Average Time Complexity: O(n), Space Complexity: O(k)
  • Radix Sort Average Time Complexity: O(nk), Space Complexity: O(n + k)
  • Bucket Sort Average Time Complexity: O(n + k), Space Complexity: O(n)