Redfin interview question

debugging round leetcoding round d