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.
|
getID
protected AbstractDivideAndConquerProblem()
protected AbstractDivideAndConquerProblem(int id)
public abstract boolean isBaseCase()
public abstract DividedDCProblem<P> divide()
DividedDCProblem
.DividedDCProblem
public abstract S baseSolve()
AbstractDivideAndConquerSolution
Copyright © 2015–2020. All rights reserved.