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 the algorithm which does depth first search through an un-weighted connected graph. In an un-weighted graph, would breadth first search or depth first search or neither find a shortest path tree from some of the node? Why?
Ans:
An algorithm that does depth first search is written below:
struct node
{
int data ;
struct node *next ;
} ; int visited[MAX] ;
void dfs ( int v, struct node **p )
struct node *q ;
visited[v - 1] = TRUE ;
printf ( "%d\t", v ) ; q = * ( p + v - 1 ) ; while ( q != NULL )
if ( visited[q -> data - 1] == FALSE )
dfs ( q -> data, p ) ;
else
q = q -> next ;}
}
Write down any four applications of the queues. Ans. A pp li cation of Queue is given below (i) Queue is
Question 1. Explain the different types of traversal on binary tree 2. Explain the Prim's minimum spanning tree algorithm 3. Differentiate fixed and variable storage allo
Q. Write down the algorithm to insert an element to a max-heap which is represented sequentially. Ans: The algorithm to insert an element "newkey" to
It is a useful tool for indicating the logical properties of data type. It is a collection of values & a set of operations on those values. Methodically, "a TYPE is a set, & elemen
Retrieval of information is made simpler when it is stored into some predefined order. Therefore, Sorting is a very important computer application activity. Several sorting algorit
How can the third dimension be displayed on the screen The main problem in visualization is the display of three-dimensional objects and scenes on two-dimensional screens. How
Surrounding of sub division method A polygon surrounds a viewport if it completely encloses or covers the viewport. This happens if none of its sides cuts any edge of the viewp
This unit dealt along with the methods of physically storing data in the files. The terms fields, records & files were described. The organization types were introduced. The sev
Write an algorithm to add an element at the end of circular linked list. Algorithm to Add the Element at the End of Circular Linked List. IINSENDCLL( INFO, LINK, START, A
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
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