Amazon Interview Question

set matrix to 0, flatten a linked list