I solved a graph problem on neetcode with the following approach, it is a dfs. But according to chatgpt it is not the best, the best is BFS because it calculates the shortest distance directly in unweighted graphs

T TODO: solve with BFS