An O(n2) solution for this problem will take time in minutes to terminate. Thus, constraints form a very important part of a well-designed problem, as they guide us through our journey to code correct solution. Removing an experience because of company's fraud, How to backfill trench under slab in Los Angeles. It means the subtasks doesn't matter much if my code is working with original constraints. O(n) - This approach makes use of dynamic programming. What is this subtask #1 and #2 and how are these important? O(n2) and O(n3) are bound to give time limit exceeded (TLE) verdict.