/* Depth first search algorithm extends the current path as far as possible before backtracking to the lastchoice point and trying the next alternative path. Depth first search may fail to find a solution if it enters acycle in the graph. This can be avoided if we never extend a path to a node which it already contains.*/