Code RoomAsymmetric panel rows
EasyPrep Room Coding #4761

Asymmetric panel rows

CodingAlgorithms & data structuresEntry–Mid~13 min

A facade workshop lays out a decorative panel as a rectangular grid of tile codes, one character per cell. The design calls for the panel to be symmetric about its centre column, which means every row has to read the same from the left as it does from the right: the tile in a column must match the tile in the column the same distance from the other end of that row. Given panel, return the indices of the rows that break that mirror, in ascending order. A row that already reads the same both ways contributes nothing. Every row has the same width. A panel with no rows returns an empty list, and a panel one tile wide is symmetric by definition, since each row has a single tile that mirrors onto itself. Tile codes are case sensitive.

Implement
mirror_break_rows(panel: list[list[str]]) → list[int]
Examples
in[[["A","B","A"],["C","D","C"],["E","F","G"]]]out[2]
in[[["X","X"],["Y","Z"]]]out[1]
in[[["T","U","T"],["V","W","V"]]]out[]
What a strong answer looks like

State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.

0:00 of about 13 min
InputExpectedGot
[[["A","B","A"],["C","D","C"],["E","F","G"]]][2]not run yetsample
[[["X","X"],["Y","Z"]]][1]not run yetsample
[[["T","U","T"],["V","W","V"]]][]not run yetsample