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);
Following are some of the drawback of sequential file organisation: Updates are not simply accommodated. By definition, random access is impossible. All records should be
an electrical student designed a circuit in which the impedence in one part of a series circuit is 2+j8 ohms and the impedent is another part of the circuit is 4-j60 ohm mm program
write pseudocode to implement a queue with two stacks
write the algorithm for adjust
You have to design a framework of a Genetic Algorithm (GA) with basic functionality. The basic functionality includes representation, recombination operators, tness function and se
Threaded Binary Tree : If a node in a binary tree is not having left or right child or it is a leaf node then that absence of child node is shown by the null pointers. The spac
Merging 4 sorted files having 50, 10, 25 and 15 records will take time
The two famous methods for traversing are:- a) Depth first traversal b) Breadth first
A graph G might be defined as a finite set V of vertices & a set E of edges (pair of connected vertices). The notation utilized is as follows: Graph G = (V, E) Consider the g
The disadvantages or limitations of the last in first out costing method are: The election of last in first out for income tax purposes is binding for all subsequent yea
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