0

How to code it?

Consider a set of web pages, numbered from 1 to N. Each web page has links to one or more web pages.Clicking on a link in a page, takes one to the other web page.You are provided numbers of two web pages viz, starting web page and end web page.Your task is to find the minimum number of clicks required to reach the end page from the start page.If end page cannot be reached from start page, print 1 as the output.For better understanding refer Examples section

3rd Nov 2023, 7:05 PM
Gokul G
Gokul G - avatar
1 Respuesta
+ 3
Seems like you should consult the examples section first.
3rd Nov 2023, 7:22 PM
Ausgrindtube
Ausgrindtube - avatar