For the first question, they asked me https://leetcode.com/problems/paint-house/. Then, they asked a follow-up question: What if the colors of the first house and the last house are also required to be different? Could someone provide an optimized solution?
Comments (7)


