c++
Implement a linked list with a shape like the followinggrid.
L
I
V
E
There are 4 tiles in the grid. Each tile has two data membersand we can define the struct like this:
struct listNode {
char data;
listNode *arr[3];
listNode (char x)
{
data = x;
arr[0] = nullptr;
arr[1] = nullptr;
arr[2] = nullptr;
};
};
Simulate the situation that a robot takes a random walk on thegrid (by using a random number generator). Initially it is on the‘L’ tile. In each move it switches its position to anyone of theother three. The system displays the position that it is on. Do therandom walking for 10 times and display
PayPal Gateway not configured
PayPal Gateway not configured