Meta Interview Question

how would you write code to traverse a matrix