Class StringInterleavingBenchmark
java.lang.Object
topics.branchandbound.stringinterleaving.StringInterleavingBenchmark
The Master Benchmark: String Interleaving Across Paradigms
This class serves as the ultimate pedagogical demonstration, benchmarking the performance of different algorithmic paradigms solving the exact same problem space.
Phases of the Benchmark:
- Generation Phase: Compares Backtracking (DFS) vs Branch invalid input: '&' Bound (BFS) for generating all valid combinations. Demonstrates the extreme overhead of maintaining a Priority Queue.
- Validation Phase: Compares pure Recursion (Divide invalid input: '&' Conquer) vs Dynamic Programming for verifying the generated combinations. Demonstrates the power of Memoization.
- Author:
- vicegd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgenerateRandomWord(int n) Generates a random lowercase string of a specific length using modern ThreadLocalRandom.static void
-
Constructor Details
-
StringInterleavingBenchmark
public StringInterleavingBenchmark()
-
-
Method Details
-
main
-
generateRandomWord
Generates a random lowercase string of a specific length using modern ThreadLocalRandom.
-