Starting from:

$30

CS180 Homework 4

CS180 Homework 4

All algorithms/proofs should be in bullet form: step by step or psuedo code.
1. Exercise 13 on page 194
2. Exercise 17 on page 197
3. Exercise 3 on Page 246
4. Exercise 7 on page 248
5. Suppose you are given an array of sorted integers that has been circularly
shifted k positions to the right. For example taking ( 1 3 4 5 7) and
circularly shifting it 2 position to the right you get ( 5 7 1 3 4 ). Design
an efficient algorithm for finding K. Note that a linear time algorithm is
obvious.
6. Consider a (balanced) heap on n nodes. Show details of how you extract
the minimum, insert a new number, and change a number (along with the
corresponding post heapify process). Analyze the time complexity of your
three algorithms.
1

More products