Databricks phone-screen question, reconstructed from 2 candidate reports (August 2025 to September 2025). Tests: dynamic programming and backtracking. Candidates reported 2 follow-ups. The write-up includes a Python solution that passes 5 test cases.