ING Interview Question

How can you programatically find the shortest path between two nodes in an unoriented graph, based on the parents/siblings representation?