T(n) = 3T(n/2 + 1) + n