Zohran Mamdani is viewed as the leading candidate to become the next mayor of New York City, even as the contest has divided the normal partisan lines between Republicans and Democrats.