Enter your email address:


C Books Guide and List
C++ Books Guide and List
Best Java Books

algorithm Representation of a Stack Data Structure

0 votes
algorithm Representation of a Stack Data Structure
asked by aryan Jr Member (840 points)

1 Answer

0 votes
 
Best answer

Representing stack data structure

Array representation


    
typedef struct stack{
    int SArray[MAX_SIZE];
    int top;
}stack;

Linked list representation

    
typedef struct SNode{
    int data;
    struct SNode *next;
}SNode;
 
typedef struct stack{
    SNode *top;
}stack;

answered by Smita Advisor (7,120 points)

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer