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. Write down a programme in C to create a single linked list also write the functions to do the following operations
(i) To insert a new node at the end
(ii) To delete the first node
Ans:
//Create a single list
struct node
{
int data;
struct node *link
}
struct node *p,*q;
//Inserting a node at the end(append)
append(struct node **q,int num)
struct node *temp; temp=*q; if(*q==NULL)
*q=malloc(sizeof(struct node *));
temp=*q;
else
while(temp link!=NULL)
temp=temp link;
temp link = malloc(sizeof(struct node *));
Temp data=num;
temp link=NULL;
//Delete the first node delete(struct node *q,int num)
struct node *temp;
*q=temp link;
free(temp);
Q. Explain w hat are the stacks? How can we use the stacks to check whether an expression is correctly parentheses or not. For example (()) is well formed but (() or )()( is not w
Ask question find frequency count of function- {for(i=1;i {for(j=1;j {for(k=1;k } } }
1. In computer science, a classic problem is how to dynamically store information so as to let for quick look up. This searching problem arises frequently in dictionaries, symbol t
State in brief about assertion Assertion: A statement which should be true at a designated point in a program.
The pre-order and post order traversal of a Binary Tree generates the same output. The tree can have maximum One node
Write down any four applications of queues. Application of Queue (i) Queue is used in time sharing system in which programs with the similar priority form a queu
Difference among Prism's and Kruskal's Algorithm In Kruskal's algorithm, the set A is a forest. The safe edge added to A is always a least-weight edge in the paragraph that lin
implement multiple stacks ina single dimensional array. write algorithams for various stack operation for them.
Step-1: For the current node, verify whether it contain a left child. If it has, then go to step-2 or else go to step-3 Step-2: Repeat step-1 for left child Step-3: Visit (th
Primitive Data Structure These are the basic structure and are directly operated upon by the machine instructions. These in general have dissimilar representations on different
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