In the fall of 2014, when Emma Petkofsky arrived for graduate school at New York University, she heard about two roommates who needed a third in Crown Heights, Brooklyn.

She eagerly moved in with them, happy to avoid a dorm room and the difficulty she might otherwise face in finding a home. Her share, in a small walk-up building, was a bit less than $1,100 a month.

Her classmate Michael Maisch had a similar story. He took a spot as a third roommate in a financial district high-rise. His monthly rent was $1,500, which he thought was too expensive.

After two years, with both roommate situations dissolving, the friends — who are pursuing degrees in occupational therapy — decided to hunt for a two-bedroom together.