This question evaluates array manipulation and algorithmic reasoning via an n x n matrix transpose and object-oriented design, data structure competency, and time-complexity reasoning for a key-value store API.
The phone screen for a Linux-oriented software engineering role included multiple coding tasks:
n x n matrix
n x n
, transform it so that rows become columns. In other words, return the matrix transpose, where
result[i][j] = matrix[j][i]
.
set, get, and setAll
set(key, value)
: assign
value
to
key
get(key)
: return the current value for
key
, or indicate that the key does not exist
setAll(value)
: update all existing keys so that they now return
value
A separate prompt mentioned reviewing a short C snippet and identifying bugs or issues, but the code itself was not provided, so that part is omitted here.