add intellij idea ignore file
add REVERSE parameter to SortUtil.getComparator()
simplify complex condition