Max value in array code


one test case is failing
pls help

first don’t do a[n] gave it a proper size according to constraint
second u have declare prev=0
what id array contain all negative number
-1 -2 -3
u will always get 0
declare prev as INT_MIN;

okay thanks :slight_smile: