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);
illlustraate the construction of tree of a binary tree given its in order and post order transversal
the voltage wave forms are applied at the inputs of an EX-OR gate. determine the output wave form
Prim's algorithm employs the concept of sets. Rather than processing the graph by sorted order of edges, this algorithm processes the edges within the graph randomly by building up
QUESTION Explain the following data structures: (a) List (b) Stack (c) Queues Note : your explanation should consist of the definition, operations and examples.
A spanning tree of any graph is only a subgraph that keeps all the vertices and is a tree (having no cycle). A graph might have many spanning trees. Figure: A Graph
Explain the representations of graph. The different ways of representing a graph is: Adjacency list representation : This representation of graph having of an array Adj of
1. Define the following terms in a rule-based expert system? a) Knowledge base b) Inference engine 2. What is a fuzzy rule? Explain the difference between classical and fuzzy
Ordinary variable An ordinary variable of a easy data type can store a one element only
It does not have any cycles (circuits, or closed paths), which would imply the existence of more than one path among two nodes. It is the most general kind of tree, and might be co
How to create multiple queue on single array?
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