Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
You are right James_pic. There's something new that I learned today. Unfortunately, implementation of OrderedDictionary is a bit of a hassle. So, as the rules allow me, I will change this solution to make Alberto Arbusto win.
@James_pic good spot! I used SortedDictionary as a smokescreen but it actually would make Alberto Arbusto always win. I have changed it to Dictionary. Now, the first entry in the text file will win.
It doesn't sort the candidates alphabetically. It only sorts the votes. You can manipulate any candidate to win. Just make sure he is the first one in the the text file.