Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Q. Implement a stack making use of the linked list. Show the PUSH and POP operations both.
Ans.
Stack implemantation using linked list
# include
struct link
{
int info ;
struct link *next;
} *start;
struct link * push (struct link * rec)
struct link *new_rec;
printf ("\n Input the new value for next location of the stack:") ;
new_rec = (struct link *) malloc (size of
(struct link)) ;
scanf ("%d", &new_rec->info) ;
new_rec->next = rec;
rec = new_rec;
return (rec);
}
struct link * pop (struct link * rec)
struct link * temp ;
if (rec == NULL)
else
printf ('\n Stack is empty") ;
temp = rec; rec= temp->next;
printf("the popped element %d", temp->.info);
free(temp) ;
return(rec);
Programming for hash table?
[(a+b)/(c+d)^(e+f)]+(g+h)/i
Design and implement an algorithm to simulate car re-organizing of the train at the railway switching junction. You can only use stacks as the data structure to represent the t
What is the difference between a grounded header link list and a circular header link list? A header linked list is a linked list which always having a special node, known as t
What are the expression trees? Represent the below written expression using a tree. Give a relevant comment on the result that you get when this tree is traversed in Preorder,
Explain about Hidden-surface Hidden-line removal refers to wire-frame diagrams without surface rendering and polygonal surfaces with straight edges. Hidden-surface removal ref
Define the Internal Path Length The Internal Path Length I of an extended binary tree is explained as the sum of the lengths of the paths taken over all internal nodes- from th
Write an algorithm in the form of a flowchart that: inputs top speeds (in km/hr.) of 5000 cars Outputs fastest speed and the slowest speed Outputs average (mean) s
How sparse matrix stored in the memory of a computer?
what is folding method?
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd