The rapid growth of cities forced people to contend with problems of housing, transportation, water, and sanitation.