leetcode 7.31 dorm