Google Cloud interview question

BFS algorithm and time complexity of all the codes u code.