Question: 1) The depth and breadth-first algorithms in OpenDSA use the data storage feature of a graph to keep track of whether the graph is visited.

1) The depth and breadth-first algorithms in OpenDSA use the data storage feature of a graph to keep track of whether the graph is visited. This is fine as long as you don't have a graph that stores some data (which you can often do in practice). Also, the visited data it accessible outside the traversals, even though it is only used in the traversals. What about information hiding? How can these problems be fixed? (just the answer. no codes)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!