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 an algorithm to insert a node in the beginning of the linked list.
Ans:
/* structure containing a link part and link part data part */
struct node { int data ; struct node * link ; } ; /* Following adds a new node at the beginning of the linked list */ void addatbeg ( struct node **q, int num ) { struct node *temp ; /* add new node */ temp = malloc ( sizeof ( struct node ) ) ; temp -> data = num ; temp -> link = *q ; *q = temp ; }
struct node
{
int data ;
struct node * link ;
} ;
/* Following adds a new node at the beginning of the linked list */
void addatbeg ( struct node **q, int num )
struct node *temp ;
/* add new node */
temp = malloc ( sizeof ( struct node ) ) ;
temp -> data = num ;
temp -> link = *q ;
*q = temp ;
}
Q. Explain quick sort? Sort the given array using quick sort method. 24 56 47 35 10 90 82 31
An adjacency matrix representation of a graph cannot having information of : Parallel edges
What are the different ways of representing a graph? The different ways of representing a graph is: Adjacency list representation: This representation of graph having of an
explain quick sort algorithm
Q. Reverse the order of the elements on a stack S (i) by using two additional stacks (ii) by using one additional queue. Ans : L e t S be the stac
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.
Write an algorithm for binary search. What are its limitations? .
Q. Give the algorithm for the selection sort. Describe the behaviours of selection sort when the input given is already sorted.
what is folding method?
how to implement multiple stack using single dimension array in c
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