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);
Column Major Representation In memory the second method of representing two-dimensional array is the column major representation. Under this illustration, the first column of
Arrays :- To execute a stack we need a variable called top, that holds the index of the top element of stack and an array to hold the part of the stack.
Q. Illustrate the result of running BFS and DFS on the directed graph given below using vertex 3 as source. Show the status of the data structure used at each and every stage.
Explain the concept of hidden lines The problem of hidden lines or surfaces was implicit even in 2-D graphics, but we did not mention it there, because what was intended to be
Build a class ?Node?. It should have a ?value? that it stores and also links to its parent and children (if they exist). Build getters and setters for it (e.g. parent node, child n
Q. Define the terms data type and abstract data type. Comment upon the significance of both these. Ans: We determine the total amount of memory to reserve by determining
how to write a function of area of a circle using python
RGB Model The RGB model is based on the assumption that any desired shade of colour can be obtained by mixing the correct amounts of red, green, and blue light. The exact hues
ST AC K is explained as follows : A stack is one of the most usually used data structure. A stack is also called a Last-In-First-Out (LIFO) system, is a linear list in
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
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