Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MichaelaIvanova/801735d550b6408776f2faaa701a0528 to your computer and use it in GitHub Desktop.
Save MichaelaIvanova/801735d550b6408776f2faaa701a0528 to your computer and use it in GitHub Desktop.
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