Practice · 3 of 3
Which Simplest-Correct?
CHALLENGE
Difficulty: advanced+25 XP
**Scenario.** n ≤ 5000, you need the maximum sum of a contiguous subarray. You see Kadane O(n) instantly. The safest professional move is: **Which approach is the best fit? The program only needs to print the letter.** **A)** Skip hand-tracing since Kadane is famous **B)** Hand-trace Kadane on an all-negative array before coding **C)** Code O(n^2) instead because it is safer **D)** Binary search the answer first
Press Submit to check your solution.
Back to lesson: Practice: Process Drills