TikTok Interview Question

1-2: so easy 3. a dynamic programming 4. probably another dynamic programming 5. airplane schedule adjustment