Find the furthest pages of a website
This is a classic "graph database" question. I would do the following steps:-


Traverse all the pages using a webcrawler, or if you can interrogate the website server directly that may be qukcker. 
Ensure you keep all links between pages, for later use.
Put the web pages into a neo4j database with connections between the pages


This will allow you to be able to do the query of pages with the maximum number of steps, or pages most frequently linked to, etc.