Halodoc interview question

They asked me to implement BFS and write search function.