演算法›Ch2 分治法第 8 題/共 12 題
8. Peak Finding、Divide and Conquer
#AL-02-008中Peak FindingDivide and Conquer
- Let be a sequence of integers and assume that . For any i with , we define to be a peak, if .
(a) (2%). Identify all peaks in the given sequence 6, 7, 4, 3, 2, 1, 4, 5.
(b) (2%). Write down a procedure that finds a peak for in time.
(c) (2%). Briefly justify your answer in (b).
📄 交大112
▤完整推導請見《WH 資工筆記 · 演算法》Ch2 分治法