An advertising layout consists of two vertical columns, each with a total height equal to the sum of the advertisements placed in it. You are given an integer array heights, where heights[i] is the height of the ith advertisement.
Advertisements are considered from left to right in heights. Each advertisement belongs to the column whose total height is smaller at that time. If both columns have the same total height, it belongs to the left column. Both columns are initially empty.
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected