I have two arrays with different sizes, say a1[5]
and a2[7]
. I want to compare the two arrays and find the largest integer. For example
Input
a1 = {52,53,48,72,20}
a2 = {28,12,73,21,33,44,88}
Output should be like a2, 88 where 88 is the largest number and a2 is the array where the largest number resides.
I did search in Google, but couldnt get anything. Just want to know is there any builtin function available for this? or give me some logic to get the output.