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);
A Sort which relatively passes by a list to exchange the first element with any element less than it and then repeats with a new first element is called as Quick sort.
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
The class Element represents a single node that can be part of multiple elements on a hotplate and runs in its own thread. The constructor accepts the initial temperature and a hea
(a) Explain the term Group Support System and elaborate on how it can improve groupwork. (b) Briefly explain three advantages of simulation. (c) Explain with the help of a
Write down any four applications of the queues. Ans. A pp li cation of Queue is given below (i) Queue is
sir how can i explain deletion process in a data structure
A freight train from Melbourne is approaching Sydney, carrying n cars of cargos. The cargos are to be delivered to n different cities in the metropolitan area of Sydney - one car f
As part of an experiment, a school measured heights (in metres) of all its 500 students. Write an algorithm, using a flowchart that inputs the heights of all 500 students and ou
Various graph traversal schemes Graph Traversal Scheme. In many problems we wish to investigate all the vertices in a graph in some systematic order. In graph we often do no
Explain in detail the algorithmic implementation of multiple stacks.
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