Skip to content

Tag: deep-copy

Deep copy object with Depth-First Search

I trying to copy an object. I want to made it with algorithm Depth-First Search. I create a function which will be copy my object without links on old objects. I have a problem, my function doesn’t count the result correctly. Where do i make a mistake? Answer dfs without recursion use additional stack t…