Quora·Machine Learning Engineer·Technical Phone Screen
- Given an m by n matrix (not necessarily square) and a list of string commands, implement each operation in sequence and return the resulting matrix. Operations include: 90-degree clockwise rotation (output dimensions flip to n by m), swapping two rows, swapping two columns, reversing a specific row, and reversing a specific column.
“The swap and reverse ops were fine, basically just index manipulation.”