If n=2^k. We want to find the maximum element in the matrix A with size n x
Fantastic news! We've Found the answer you've been seeking!
Question:
If n=2^k. We want to find the maximum element in the matrix A with size n x n.
To do that, we have to divide the matrix into four equal parts with size n/2 x n/2.
And find the maximum element in each recursively.
How many comparisons are needed to find the maximum element in the matrix A?
Related Book For
Introduction to Algorithms
ISBN: 978-0262033848
3rd edition
Authors: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest
Posted Date: