Amazon interview question

1 . BFS 2 . ARRAYS