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);
Given are the definitions of some important terms: 1) Field: This is an elementary data item characterized by its size, length and type. For instance, Name
Write the non-recursive algorithm to traverse a tree in preorder. The Non- Recursive algorithm for preorder traversal is as follows: Initially push NULL onto stack and
what do you understand by structured programming?explain with eg. top down and bottem up programming technique
Q. Write down an algorithm to test whether a Binary Tree is a Binary Search Tree. A n s . The algorithm to check whether a Binary tree is as Binary Search
Write an algorithm to calculate a postfix expression. Execute your algorithm using the given postfix expression as your input : a b + c d +*f ↑ . T o evaluate a postfix expr
explain collision resloving techniques in hasing
Materials consumed are priced in a systematic and realistic manner. It is argued that current acquisition costs are incurred for the purpose of meeting current production and sales
System defined data types:- These are data types that have been defined by the compiler of any program. The C language contains 4 basic data types:- Int, float, char and doubl
The advantage of list over Arrays is flexibility. Over flood is not a problem until the computer memory is bushed. When the individual record are quite large, it may be difficult t
Question 1 Discuss the advantages of implementation checks preconditions Question 2 Write a ‘C' program to search for an item using binary search Question 3 Show that To
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: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd