Can you tell what is the reason why my code is not passing all the test cases

hello @
array is not sorted, explictly find the max

not passing all the two test cases

dont sort the array, u cant change the array order