how to implement stack operation using singly linked list
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / spandana
it is a datastructure which follows the principal of Last
in First order(LIFO) ie last inserted element will be
deleted first.hence both insertions and deletions takes
place at the same end.it can perform 2
operations "PUSH","POP". the special variable used in
stacks is "top"
stacks can be implemented using arrays,linked lists
| Is This Answer Correct ? | 2 Yes | 1 No |
multiple of 9 without useing +,* oprator
how does the for loop work actually..suppose for the following program how it ll work plz explain to me for(i=5;i>=0;i--) prinf(i--);
what is function pointer?
Multiply an Integer Number by 2 Without Using Multiplication Operator
What does the characters “r” and “w” mean when writing programs that will make use of files?
WAP – represent a char in binary format
how i m write c program 1.check prime number 2.prime number series
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
main is a predefined or user define function if user defined why? if predefined whay?
write a program to display the numbers in the following 4 4 3 3 2 2 1 1 0 1 1 2 2 3 3 4 4
Explain how do you sort filenames in a directory?
Suppose I want to write a function that takes a generic pointer as an argument and I want to simulate passing it by reference. Can I give the formal parameter type void **, and do something like this? void f(void **); double *dp; f((void **)&dp);