Skip to content

Instantly share code, notes, and snippets.

@dapurv5
Created January 3, 2013 21:33
Show Gist options
  • Save dapurv5/4447504 to your computer and use it in GitHub Desktop.
Save dapurv5/4447504 to your computer and use it in GitHub Desktop.
Sorted 2d Matrix
int[][] G = {
{1, 4, 7, 11, 15},
{2, 5, 8, 12, 19},
{3, 6, 9, 16, 22},
{10, 13, 14, 17, 24},
{18, 21, 23, 26, 30}
};
System.out.println(Arrays2D.contains(G, -1));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment