Skip to content

Instantly share code, notes, and snippets.

@codertcet111
Created July 12, 2020 13:33
Show Gist options
  • Save codertcet111/6717d88ec902a82e2515adef58e81c43 to your computer and use it in GitHub Desktop.
Save codertcet111/6717d88ec902a82e2515adef58e81c43 to your computer and use it in GitHub Desktop.
Algorithm DivideAndConquer ( Problem ) {
if Problem is too small and easily solvable then{
return solution for Problem
}
else {
Divide the Problem into subproblems P1, P2, ......., Pn
return Combine( DivideAndConquer(P1), DivideAndConquer(P2), ........, DivideAndConquer(Pn))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment