Made min_add_chain dfs w/id soln more efficient