BFS - Shortest Path

getting compile-time error

please tell me error

hello @deepaksharma42045
a) u r not initialising ur distamce array correctly.
use loop
b) also its dataype must be int
c) check output format