Second test cases for sort game failed

I covered all the conditions for sorting a list for name and salary in desc order and lexicographical comparing a string with same salary using compareTo function.

For this, I maintained two lists of names and salary first sorted them, and traversed again on the sorted list for the same salary to order the names.

if(salary >= number){ ///   >=  not  >
	EmpNames.add(name);
	EmpSalary.add(salary);
}

make it >=

1 Like