Question: Please follow the instructions and solve it by C++. Please and thank you!. As shown in the figure below, there are four nodes in the

Please follow the instructions and solve it by C++. Please and thank you!.

As shown in the figure below, there are four nodes in the system, and each node

consists of four fields: one char field and three link fields. The char field contains

exactly one char. Let us assign the letters L, I, V, and E to each one of the

node. The three links of a node allows the node to directly connect to other three

nodes in the system.

Write a program which builds up such a system. Use a pointer

named head to

point to the node with the letter L. Design the system so that it simulates the

random walk of a robot. Initially the robot stands on the L node. It then

randomly walks to any one of the other three nodes. It continues to do this for

ten

times and each time the system prints the letter which the robot stands on.

The output might be something like the following:

L E L I V I L V E L

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!