how to implement stack operation using singly linked list

Answer Posted / vignesh1988i

we know that stack is a data structure where the
highest priority will be given to the last element that is
pushed inside and the priority will decrease respectively to
the next consecutive elements........ so we are going to
implement in singly list .... so we are going to insert the
node to the left side of a reference node....... operations
performed in stack are : PUSH & POP..... PUSH here means we
are going to insert a element only at last ..... and POP
means displaying the node from first........


thank u

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you increase the size of a dynamically allocated array?

636


if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.

4485


What is bubble sort technique in c?

580


When should the volatile modifier be used?

675


Explain how can I prevent another program from modifying part of a file that I am modifying?

630






Explain how many levels deep can include files be nested?

620


hi, which software companys will take,if d candidate's % is jst 55%?

1652


Explain the properties of union.

604


What is #define in c?

608


What is the difference between strcpy() and memcpy() function in c programming?

618


Explain why c is faster than c++?

564


write a program to find the given number is prime or not

3824


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

1616


What is void main () in c?

722


What is 02d in c?

626