Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Evaluation the runtime of merge sort.
- https://teamtreehouse.com/library/evaluating-the-runtime-of-merge-sort
- in Python a recursive and an iterative version.
- 3:28
- In the recursive one we use list slicing with every recursion call, but we achieve
- 3:33
- the same end result using an iterative approach without using list slicing.
- 3:37
- Over there we declared two variables to keep track of the starting, and
- 3:42
- ending positions in the list.
- 3:44
- We could rewrite merge sort to do the same, but
- 3:47
- I'll leave that as an exercise for you.
- 3:49
- If you want some hints, or
- 3:51
- if you want any direction I've included a link in the notes with an implementation.
- 3:55
- So that is time complexity.
- 3:58
- Now just so we know, before moving on, for
- 4:01
- Python here our overall run time is not what I've listed here.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement