two ways of get the max k num