Here i think we don't need of psf?

here i think we don’t need of path so far??
please clear my doubt

@Vipin_coder,
path so far is required to keep a track of nodes visited and the path followed to reach the node. It might not be used in some questions, but it is something we should include in our code.