Major U.S. indexes climbed for a fourth straight session on Tuesday, led by names in the tech sector.