Recurrence Relation for Time Complexity