This project is part of the Algorithmic Analysis and Peer Code Review assignment.
It implements Shell Sort with three gap sequences:
- Shell's original sequence (
n/2, n/4, ..., 1
) - Knuth's sequence (
(3^k - 1) / 2
) - Sedgewick's sequence (
4^k + 3*2^(k-1) + 1
)
The implementation tracks performance metrics (comparisons, assignments, swaps) and provides a CLI tool for benchmarking.
assignment2-shellsort/
βββ src/
β βββ main/java/
β β βββ algorithms/ShellSort.java
β β βββ metrics/PerformanceTracker.java
β β βββ cli/BenchmarkRunner.java
β βββ test/java/algorithms/ShellSortTest.java
βββ docs/
β βββ analysis-report.pdf
β βββ performance/results.csv
βββ pom.xml
βββ README.mdassignment2-shellsort/
βββ src/
β βββ main/java/
β β βββ algorithms/ShellSort.java
β β βββ metrics/PerformanceTracker.java
β β βββ cli/BenchmarkRunner.java
β βββ test/java/algorithms/ShellSortTest.java
βββ docs/
β βββ analysis-report.pdf
β βββ performance/results.csv
βββ pom.xml
βββ README.md
mvn compile
π§ͺ Run unit tests mvn test π Run benchmark java -cp target/classes cli.BenchmarkRunner 10000 random knuth
The results (time, comparisons, assignments) will be printed in console and saved to docs/performance/results.csv.
π Report The detailed algorithmic analysis and performance report can be found here: π docs/analysis-report.pdf
Author Nurdaulet Aitynbek