New York City’s contentious mayoral race will come to a head in the coming days as voters begin casting their ballots.