Question
Two teammates agree to split a chronological list of project expenses: the first pays every expense up to some cut point, the second pays everything after it. Both parts must be non-empty and must total the same amount. Given the expense amounts in order (values may be negative for refunds), return True if such a cut point exists and False otherwise. Example: costs = [10, 4, 6, 8, 12] gives True — cut after the third expense: 10 + 4 + 6 = 8 + 12 = 20.
can_split_evenly(costs: list[int]) → bool[[10,4,6,8,12]]outtrueState your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.