Given a 2-D matrix, find the element having maximum value using multi-threading.
Prerequisite :
Multithreading
Examples :
Input : {{1, 5, 3, 6},
{22, 10, 4, 34},
{4, 45, 67, 3},
{69, 3, 23, 3}}
Output :69
Input :{{1, 2, 3}
{2, 4, 5}}
Output :5
👁 Image
A matrix can be of very large size so when it comes to traversing it, it will take lot of time. When finding the max element in a matrix, each element of the matrix is to be traversed which will take more time. So, to minimize the time taken in traversing the matrix can be avoided using multi-threading.
Output :
👁 Image