Hi, I recently gave an open assessment in which I got this question but I couldn't figure out how to solve this question optimally. We'll surely be applying BFS here but the fact that we need to "intelligently" compute all the paths lengths was beyond me.
Are there any similar questions here on Leet code which I can practice?



Thanks.