title: Check duplicate in rows and columns 2D Array
body: <p>how would I go about checking a duplicate for columns and rows and return true or false depending if there's duplicates. For example</p>
  
  <p><code>1 2 3</code></p>
  
  <p><code>3 1 2</code></p>
  
  <p><code>2 3 1</code> </p>
  
  <p>Would return true because no duplicates, but..</p>
  
  <p><code>1 2 2</code></p>
  
  <p><code>3 2 3</code></p>
  
  <p><code>2 1 1</code></p>
  
  <p>would return false because there is a duplicate in column 2 {2, 2, 1}.</p>
  
  <p>How would I go about checking for if there are in duplicates in the rows and then checking if there are duplicates in the columns?</p>
  
  <p>So far I have only the following:</p>
  
  <pre><code>public static boolean hasDuplicates(int [][] inArray)
  {
     for (int row = 0; row &lt; inArray.length; row++)
     {
        int rowCheck = inArray[row][inArray.length];
        for (int col = 0; col &lt; inArray[row].length; col++)
        {
  
        }
     }
     return false;
  }
  </code></pre>
  
  <p>So I need to take in an array and check if there are any duplicates among the columns or rows. Any pointers? Thank you!</p>
  
  <p><strong>NOTE:</strong> This cannot be done with outside methods</p>