Virtual column rendering
Your task
A data grid virtualises its columns as well as its rows. widths gives the pixel width of each column in display order, and the first frozen columns are pinned to the left edge, so they always render and they cover the leftmost pixels of the window. The scrolling columns sit in a strip of their own that starts at pixel 0, and the window shows the part of that strip beginning at scroll_x and running for whatever width the pinned columns left over. A scrolling column renders when it shares at least one pixel with that part, so a column of zero width never renders, and neither does one ending exactly where the part begins. When the pinned columns fill the window on their own, only they render. Return the indices of every rendered column, in ascending order.
Examples
rendered_grid_columns(widths: list[int], frozen: int, viewport: int, scroll_x: int) -> list[int]rendered_grid_columns([120, 80, 200, 90, 150], 1, 300, 0)[0, 1, 2]rendered_grid_columns([120, 80, 200, 90, 150], 1, 300, 100)[0, 2]rendered_grid_columns([60, 60, 60, 60], 0, 120, 60)[1, 2]