new method of HAKMEM
optimaze HAKMEM first time
optimaze HAKMEM second time