title: Minimum string in a hash table?
body: <p>Here's my code. I can't figure out why it's not working but it fails with strings GF and LH.</p>
  
  <pre><code>private int N;           // number of strings in the hash table
  private int M;           // size of linear probing table
  private String[] keys;   // the keys
  
  // Returns the minimum string in the table
  // Returns null if no such string exists
  public String min() {
      // TODO
      String min = keys[0];
      for (int i=0;i&lt;N;i++) {
  
          if (keys[i].compareTo(min) &lt; 0) {
              min = keys[i];
          }
      }
  
      return min;
  }
  </code></pre>