There are 2 wiki pages. We need to find out whether it is possible to get to the page we are looking for from this page (# 1) (# 2). The nesting level can be up to 4 pages.

for example, searchWiki ('Microsoft', 'Nintendo'). then (res) {console.log (res); }); // Expected Result: // ['Microsoft', 'XBox', 'GameCube', 'Nintendo']

request is sent using JSONP - http://en.wikipedia.org/w/api.php?action=parse&page=title&prop=text§ion=0&format=json&callback=func

The logic of the implementation is of interest. In the first selection of links, their number is equal to 170 - in each link another ~ 170 and that 170 * 170 * 170 * 170 = 800,000,000

Help!!!

    1 answer 1

    800,000,000 pages are most likely not to have to be scratched as soon as you scour an array, there is a page that, within 4 attachments, refers to the final page, the search stops and (get from # 1 to # 2) = true;