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 |
write a program that finds the factorial of a number using recursion?
how to generate sparse matrix in c
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
How can you convert integers to binary or hexadecimal?
Find string palindrome 10marks
5 Answers Honeywell, Infosys, Riktam, Roland,
can any one provide me the notes of data structure for ignou cs-62 paper
Write a program to produce the following output in c language? 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
What is the hardest programming language?
Define a structure to store the record of library. The record must consist of at least following fields: Title, Author, Edition, Price, Publisher, and Category. -Define functions authorSearch ( ), TitleSearch ( ) and CategorySearch ( ) to search a book with respect to author, title and category. [There can be more than one book, written by one author, in one category]
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..
difference between native and cross compilers
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }