Created
February 22, 2015 10:33
-
-
Save jordanterry/d523da405f556b7bb916 to your computer and use it in GitHub Desktop.
Pseudocode example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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