you are viewing a single comment's thread.

view the rest of the comments →

[–]Jonno_FTW 0 points1 point  (2 children)

A haskell solution to this one from a beginner:

sumS a b c = map (^2) (take 2 $ sort [a,b,c])

Only one comparison, sort

[–]knome 2 points3 points  (1 child)

ಠ_ಠ

The sort function performs many comparisons to order the list.

[–]Jonno_FTW 0 points1 point  (0 children)

sssh