refactored getLeastEfficientHero algorithm