src/main/java/com/leetcode/hashtable/easy/TwoSumIII_170.java
public boolean find(int value) {
      for (Integer key : map.keySet()) {
        int searched = value - key;
        if (map.containsKey(searched)) {
          if (key != searched) {
            return true;
          } else if (map.get(key) > 1) {
            return true;
          }
        }
      }
      return false;
    }
/** Find if there exists any pair of numbers which sum is equal to the value. */
Find if there exists any pair of numbers which sum is equal to the value.
Find if there exists any pair of numbers which sum is equal to the value .
public boolean find(int value) {
      for (Integer key : map.keySet()) {
        int searched = value - key;
        if (map.containsKey(searched)) {
          if (key != searched) {
            return true;
          } else if (map.get(key) > 1) {
            return true;
          }
        }
      }
      return false;
    }
public boolean find ( int value ) { for ( Integer key : map . keySet ( ) ) { int searched = value - key ; if ( map . containsKey ( searched ) ) { if ( key != searched ) { return true ; } else if ( map . get ( key ) > 1 ) { return true ; } } } return false ; }
Find if there exists any pair of numbers which sum is equal to the value.
Find if there exists any pair of numbers which sum is equal to the value .