Created
July 13, 2017 15:02
-
-
Save MichaelaIvanova/801735d550b6408776f2faaa701a0528 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public static int solution(int[] A) | |
{ | |
Array.Sort(A); | |
var r = Math.Max(A[A.Length - 1] * A[A.Length- 2] * A[A.Length - 3], | |
A[0] * A[1] * A[A.Length - 1]); | |
return r; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment