Question d’entretien chez Atlassian

Write a function that implements a vote counting algorithm.