Course Solutions Uncategorized (Solved) : C Implement Linked List Shape Like Following Grid L V E 4 Tiles Grid Tile Two Data Members Q28893120 . . . .

(Solved) : C Implement Linked List Shape Like Following Grid L V E 4 Tiles Grid Tile Two Data Members Q28893120 . . . .

 

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

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post