The D'Hondt method is a proportional representational method for allocating seats to parties in an election.
Take a vector of votes cast for a number of parties and the total number of seats to be won. Return a vector of the same size showing the allocation of the seats won.
The process is:
Note: the total number of seats to be won will always be a positive integer and no ties will need to be resolved to allocate the seats.