Split Array Largest Sum
Hard · Binary Search · about 30 minutes
Asked at Google, Amazon, Meta, Databricks.
nums holds non-negative integers. Cut it into exactly k non-empty contiguous pieces. Each piece has a total; choose the cuts so that the biggest of those totals is as small as it can be, and return that smallest possible maximum.