Skip to content

Instantly share code, notes, and snippets.

@jordanterry
Created February 22, 2015 10:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jordanterry/d523da405f556b7bb916 to your computer and use it in GitHub Desktop.
Save jordanterry/d523da405f556b7bb916 to your computer and use it in GitHub Desktop.
Pseudocode example
Sort the input array into numerical order
result = result of the last three elements in the array
if the smallest two numbers are greater than 0 and the first element is 0
altResult is result of the two smallest values and the largest value
if altResult > result
return altResult
endIf
endIf
return result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment