Help needed for FLOW017

here is the problem link:
my solution link :
for this problem I tried using max and min functions instead of ‘if else’. It is giving the same output when I run it but when I submit it, it is wrong.
can someone please help me fix this…thanks in advance.

Consider the test input:

1 3 2
1 Like

As per your code if b>a and b>c res1=b and res2 also equals b and hence when you take the min of res1 and res2 you still get b which is the maximum element.

1 Like

thanks…got it

1 Like