Robinhood·Software Engineer·Onsite - Coding / Algorithms
- Given a list of events for a single day (each with a start and end time in minutes since midnight), write a function that computes a visual layout for a calendar day view. Overlapping events must go in different columns, and you should return each event's column index plus the total columns needed for its overlap group, using the minimum number of columns possible.
- You have a list of strings and exactly 3 rows, each with a fixed max width. Process strings in order. Part A: place each string into any row with enough remaining capacity, or report failure. Part B: among valid rows, always pick the one with the most remaining space before placement, breaking ties by smallest row index. Return the placement and remaining space per row.
“This one looked manageable until I started thinking about what 'group' actually means when you have chains of overlapping events.”