comefrom: <awangdev>169. Majority Element_1.java
code: public int majorityElement(int[] nums) {
          if (nums == null || nums.length == 0) {
              return -1;
          }
          Map<Integer, Integer> map = new HashMap<>();
          for (int num : nums) {
              if (!map.containsKey(num)) {
                  map.put(num, 0);
              }
              map.put(num, map.get(num) + 1);
          }
          
          int halfLen = nums.length / 2;
          for (Map.Entry<Integer, Integer> entry : map.entrySet()) {
              if (entry.getValue() > halfLen) {
                  return entry.getKey();
              }
          }
          return -1;
      }
masked: public int sample_funcname ( int [ ] var_0 ) {
    if ( var_0 == null || var_0 . length == 0 ) {
      return - 1 ;
    }
    Map < Integer , Integer > var_1 = new HashMap < > ( ) ;
    for ( int var_2 : var_0 ) {
      if ( ! var_1 . containsKey ( var_2 ) ) {
        var_1 . put ( var_2 , 0 ) ;
      }
      var_1 . put ( var_2 , var_1 . get ( var_2 ) + 1 ) ;
    }
    int var_3 = var_0 . length / 2 ;
    for ( Map . Entry < Integer , Integer > var_4 : var_1 . entrySet ( ) ) {
      if ( var_4 . getValue ( ) > var_3 ) {
        return var_4 . getKey ( ) ;
      }
    }
    return - 1 ;
  }
  