Link to home
Start Free TrialLog in
Avatar of joely2k
joely2k

asked on

How to use pseudocodes in linked list?

    node *pointsHead, *pointsTail, *temp;

     pointsHead = new node;
     strcpy(pointsHead->playerName, "HUMAN");
     pointsHead->playerPoint = 0;
     pointsHead->next = NULL;

     pointsTail = new node;
     strcpy(pointsTail->playerName, "COMPUTER");
     pointsTail->playerPoint = 0;
     pointsTail->next = pointsHead;

     pointsHead = pointsTail;
     pointsTail = pointsHead->next;




How can I simply tell the above algorithm in Pseudocodes?
Thanks....
Avatar of madface
madface

not sure what you mean but try this

pointsHead <-- allocate node
strcpy(pointsHead.playerName, "HUMAN")
pointsHead.playerPoint <-- 0
pointsHead.next <-- nothing

pointsTail <-- allocate node
strcpy(pointsHead.playerName, "COMPUTER")
pointsTail.playerPoint <-- 0
pointsTail.next <-- pointsHead

pointsHead <-- pointsTail
pointsTail <-- pointsHead.next

as you my know different software dev firms may write there pseudocode different. There is no set standard for it.
Oh ya you should really write psuedocode first then write your code, it will be good practice for you when you get to the REAL job.
ASKER CERTIFIED SOLUTION
Avatar of originalrobby
originalrobby

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
joely2k:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.