Atlassian interview question

Finding a winner in election (votes given as array)