Algorithms Flashcards

1
Q

Divide and conquer

A

DAC(a, i, j)
{
if(small(a, i, j))
return(Solution(a, i, j))
else
m = divide(a, i, j) // f1(n)
b = DAC(a, i, mid) // T(n/2)
c = DAC(a, mid+1, j) // T(n/2)
d = combine(b, c) // f2(n)
return(d)
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly