<awangdev>496. Next Greater Element I_2.java
private int check(int[] nums, int index, int val) {

        for (int i = index; i < nums.length; i++) {
            if (nums[i] > val) return nums[i];
        }
        return -1;
    }
private int sample_funcname ( int [ ] var_0 , int var_1 , int var_2 ) {
  for ( int var_3 = var_1 ;
  var_3 < var_0 . length ;
  var_3 ++ ) {
    if ( var_0 [ var_3 ] > var_2 ) return var_0 [ var_3 ] ;
  }
  return - 1 ;
}
