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. 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.
Ans:
Depth first search (DFS):
Depth first search (DFS) beginning from vertex 3 as source and traversing above adjacency list one by one, the following result is obtained:
3-7-2-8-6-5-4-1
Breadth First Search(BFS):
Q
In this elements are inserted from rear and deleted from front. Before removing an element, insert its element in the queue. So result get of BFS in the given graph is: 3-7-2-8-6-5-4-1
In this elements are inserted from rear and deleted from front. Before removing an element, insert its element in the queue. So result get of BFS in the given graph is:
Write the algorithm for Binary search. Also apply this algorithm on the following data. 22, 44, 11, 88, 33, 55, 77, 66
important points on asymptotic notation to remember
write an algorithm for stack using array performing the operations as insertion ,deletion , display,isempty,isfull.
nested for loop for (i = 0; i for (j = 0; j sequence of statements } } Here, we observe that, the outer loop executes n times. Every time the outer loop execute
how do we use 4-discs stack to solve tower of hanoi problem and write an algorithm to solve it?
* Initialise d & pi* for each vertex v within V( g ) g.d[v] := infinity g.pi[v] := nil g.d[s] := 0; * Set S to empty * S := { 0 } Q := V(g) * While (V-S)
Q. Explain the result of inserting the keys given. F, S, Q, K, C, L, H, T, V, W, M, R, N, P, A, B, X, Y, D, Z, E in an order to an empty B-tree of degree-3.
Method to measure address of any element of a matrix stored in memory. Let us consider 2 dimensional array a of size m*n further consider that the lower bound for the row index
Write steps for algorithm for In-order Traversal This process when implemented iteratively also needs a stack and a Boolean to prevent the execution from traversing any portion
HOW DO I CREATE ENSEMBLE NETWORK IN MATLAB
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