Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Mooophy committed Apr 5, 2015
1 parent 5ae9812 commit 0d73ebd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ch02/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@ Are-There-Two-Elements-That-Have-Sum-As-Specified(set, sum)
* Time complexity for merging all sublists
```cpp
From Figure 2.5:
it takes theta(n) to merge each level in recursion tree. "
total height of the recursion is theta(lg(n))
merging start from the first level to lg(k)
theta(n(lg(n) - lg(k))) = theta(n(lg(n/k)))
As shown in Figure 2.5:
it takes theta(n) to merge each level in recursion tree. "
total height of the recursion is theta(lg(n))
merging start from the first level to lg(k)
theta(n(lg(n) - lg(k))) = theta(n(lg(n/k)))
Hence, it takes T(n) = theta(n(lg(n/k))) to merge the sublists.
```

0 comments on commit 0d73ebd

Please sign in to comment.