Find the Number of Ways to Place People II | Leetcode 3027