Class MaxSumBenchmark

java.lang.Object
topics.divideconquer.maxsum.MaxSumBenchmark

public class MaxSumBenchmark extends Object

Empirical Runtime Analysis for Maximum Subarray Sum

This benchmarking utility demonstrates the dramatic performance differences between algorithmic complexities: Cubic O(N³), Quadratic O(N²), and Linearithmic O(N log N).

Educational Note

The execution loop is strictly capped at N = 4096. If allowed to scale indefinitely, the O(N³) algorithm would cause the CPU to hang for hours due to combinatorial explosion.

Author:
vicegd
  • Constructor Details

    • MaxSumBenchmark

      public MaxSumBenchmark()
  • Method Details

    • main

      public static void main(String[] args)