recursion and dp, be careful when comparing and adding path
classical BFS