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
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?
Step by Step Solution
There are 3 Steps involved in it
To find the maximum element in the matrix A we need to compare each element in the matrix with the current maximum Since we are dividing the matrix in... View full answer
Get step-by-step solutions from verified subject matter experts
