I have a problem which I want to solve by implementing something like Depth First Search algorithm. Please help me.
The problem is like as following:
Some lists like this :
if x1[]==x2[], then M=Union[x1[],x2[], and try to Union[M,x3[]. If this fail, then try to check next element in x3, and so on. If all elements in x3 could not match M, then go one step back and try to check x1[] with x2[], and so on. As long as the match go through a tree path and reach the bottom then return the solution, otherwise, return false.