Opendoor interview question

Solve algorithms in their code.