Amazon Interview Question

I was expecting Front End Engineering questions based on HTML, CSS, Javascript/jQuery and I was asked what is the best way to search and find the best possible way to reach a node.