P - The type of the problem.S - The type of the problems solution.public abstract class AbstractDivideAndConquerProblem<P,S> extends Identifiable
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDivideAndConquerProblem() |
protected |
AbstractDivideAndConquerProblem(int id) |
| Modifier and Type | Method and Description |
|---|---|
abstract S |
baseSolve()
Solves the problem, only if it is a base case problem.
|
abstract DividedDCProblem<P> |
divide()
Divides the problem and creates a
DividedDCProblem. |
abstract boolean |
isBaseCase()
Determines whether or not the problem is a base case.
|
getIDprotected AbstractDivideAndConquerProblem()
protected AbstractDivideAndConquerProblem(int id)
public abstract boolean isBaseCase()
public abstract DividedDCProblem<P> divide()
DividedDCProblem.DividedDCProblempublic abstract S baseSolve()
AbstractDivideAndConquerSolutionCopyright © 2015–2020. All rights reserved.