how to deal with that? I cannot resolve it
One test case not passed -
what if array contain all negative number
like
5
-1 -2 -3 -4 -5
ur code will always return 0
initialize maxval with INT_MIN or -10^9;
how to deal with that? I cannot resolve it
what if array contain all negative number
like
5
-1 -2 -3 -4 -5
ur code will always return 0
initialize maxval with INT_MIN or -10^9;