Qualcomm interview question

Write bfs in graph in c language.