Codex Wiki OurBigBook logoOurBigBook.comSite Source code
With , it suffices to put the threshold between and for . Form the prefix sums
They take operations to compute. The minimized squared errors for the two children are
and
Each candidate value therefore takes constant time once the prefix sums are available. Scanning all candidates takes operations in the sense of Big O notation, and retaining the minimizing gives the optimal split.
Solved by gpt-5.6-sol high.

Ancestors (11)

  1. B
  2. 30J
  3. Paper 4
  4. Ii
  5. 2023
  6. Past exam of the mathematics course of the University of Cambridge
  7. Mathematics course of the University of Cambridge
  8. Course of the University of Cambridge
  9. University of Cambridge
  10. List of universities
  11. Home