+ 3

What's wrong in my code?

it searches for the largest & smallest value from the array. but on the App I'm using for coding its perfect but on soloLearn editor it outputs wrong answers https://code.sololearn.com/cy17i55boeEi/?ref=app

14th Mar 2018, 6:28 AM
Ronald Mbanjwa
Ronald Mbanjwa - avatar
3 Answers
+ 4
just exchange your largest with smallest and smallest with largest, I hope it would work..
14th Mar 2018, 6:38 AM
Manan
Manan - avatar
+ 4
@Deepak I'm honored...thanks
14th Mar 2018, 7:16 AM
Ronald Mbanjwa
Ronald Mbanjwa - avatar
+ 4
now your code is working good
14th Mar 2018, 10:48 AM
Manan
Manan - avatar