Microsoft interview question

String&Array, BFS, Binary Search