For the input [11, 16, 15, 5] I get the correct answer when I test it on the buil

for the input [11, 16, 15, 5] I get the correct answer when I test it on the built in compiler but get a different answer on submitting it

Accessing invalid memory maybe ? Your compiler might be giving back garbage value as 0.

Click here to start solving coding interview questions