About a week after my recruiter call, I had a sixty-minute pair-programming session on HackerRank. I used Python, which I had arranged with Wise in advance.
The exercise found an election winner by repeatedly eliminating the least-supported remaining candidate and transferring preferences. Follow-ups concerned representing candidates with an enum, leaving ballots unchanged, and resolving ties.
The discussion then expanded to millions of ballots in a file, with between three and fifteen candidates. Counting preference patterns and processing the file in chunks were proposed to avoid loading all the ballots into memory.
Discussion
Loading comments…