COP 4531: Lecture 3
Learning objectives
After this class, you should be able to:
- Describe the three components of divide and conquer algorithms.
- Given two sorted arrays, show the steps executed by the linear time
MERGE
procedure discussed in class.- Given an array, show the steps executed by
MERGE-SORT
to sort the array.- Derive the time complexity of merge sort.
- Given a simple problem, develop a divide and conquer algorithm to solve it, and derive its time complexity.
Reading assignment
- CLR: Section 2.3.
- None.
Exercises and review questions
- Questions on current lecture's material
- Exercise 2.3-1.
- Exercise 2.3-4.
- Give a divide and conquer algorithm for the linear search problem mentioned in exercise 2.1-3, and derive its time complexity.
- (Post your solution on the discussion board) Why does divide and conquer not help with the linear search problem, while it helps with sorting?
- Questions on next lecture's material
- None.