Microsoft interview question

Graph, and two array problems