Skip to content

Latest commit

 

History

History
17 lines (16 loc) · 1.02 KB

README.md

File metadata and controls

17 lines (16 loc) · 1.02 KB

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)