MathWorks interview question

Alogirthms dfs bfs java basics C++ basics oops