I don't see the advantage of "l = sortedCandidates.length; k < l" versus "k < sortedCandidates.length". Adding that additional variable seems unnecessary. And as a side note, the lowercase L looks a lot like a number 1 in code text. Might be best practice to always avoid lowercase L's as variables to avoid confusion.