Java Block Voting Solution