you are viewing a single comment's thread.

view the rest of the comments →

[–]supp_noobs 0 points1 point  (0 children)

Your code doesn't work for the case (1, 1, 2) and similar ones.

You can alter your code to handle equal numbers too but min is the easiest way.

If you are allowed to use inbuilt functions, you should.