Implement the median-finding algorithm of Section 15.6. Then, modify this algorithm to allow finding the ith element for any value i
The implementation for Floyd’s algorithm given in Section 16.2.2 is inefficient for adjacency lists because the edges are visited in a bad order when initializing array D. What is the cost of of this initialization step for the adjacency list? How can this initialization step be revised so that it costs Θ(|V| 2 ) in the worst case?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here