Class ChangeTest

java.lang.Object
topics.greedy.change.ChangeTest

@DisplayName("Coin Change - Greedy Paradigms") class ChangeTest extends Object

Validation Suite for Greedy Coin Change

Demonstrates both the success cases of the Greedy algorithm and the mathematical boundaries where it fails to find the global optimum (The Greedy Trap).

Author:
vicegd
  • Constructor Details

    • ChangeTest

      ChangeTest()
  • Method Details

    • setup

      @BeforeAll static void setup()
    • shouldFindOptimalSolution

      @Test @DisplayName("Should find the mathematically optimal solution for canonical coin sets") void shouldFindOptimalSolution()
    • shouldDemonstrateSubOptimalGreedyBehavior1

      @Test @DisplayName("Should fall into the Greedy Trap (Sub-optimal solution #1)") void shouldDemonstrateSubOptimalGreedyBehavior1()
    • shouldDemonstrateSubOptimalGreedyBehavior2

      @Test @DisplayName("Should fall into the Greedy Trap (Sub-optimal solution #2)") void shouldDemonstrateSubOptimalGreedyBehavior2()