The maximum degree of any vertex in a simple graph with n vertices is
A 3-ary tree is a tree in which every internal node has exactly 3 children. The number of leaf nodes in such a tree with 6 internal nodes will be
1 Crore+ students have signed up on EduRev. Have you? Download the App |
From the diagram below which one is the correct PREORDER, INORDER and POSTORDER traversal
A-2-3-tree is a tree such that
1. All internal nodes have either 2 or 3 children.
2. All paths from root to the leaves have the same length
The minimum number of internal nodes of a 2-3 tree having 9 leaves could be
A binary search tree is generated by inserting in order the following integers:
50, 15, 62, 5, 20,58, 91, 3, 8, 37, 60, 24
The number of nodes in the left subtree and right subtree of the root respectively is
From the given syntax tree the corresponding expression is:
Consider an undirected unweighted graph G. Let a breadth-first traversal of G be done starting from a node r. Let d(r, u) and. d(r, v) be the lengths of the shortest paths from r to u and v respectively in G. If u is visited before v during the breadth- first traversal, which of the following statement is correct
The minimum number of colours required to colour the vertices of a cycle with n nodes in such a way that no two adjacent nodes have the same colour is
Consider the directed graph given below:
Which one of the following is TRUE ?
Given below are some algorithms, and some algorithm design paradigms.
List-1
A. Dijkstra’s Shortest Path
B. Floyd-Warshall algorithm to compute all pairs shortest path
C. Binary search on a sorted array
D. Backtracking search on a graph
List-II
1. Divide and Conquer
2. Dynamic Programming
3. Greedy design
4. Depth-first search
5. Breadth-first search
Match the above algorithms (List-I) to the corresponding design paradigm (List-ll) they follow.
Consider the following table: Match the algorithms to the design paradigms they are based on.
What is the time complexity for the following C module? Assume that n > 0.
int module (intn)
{
if (n == 1)
return 1;
else return (n + module ( n - 1));
}
The number of rotations required to insert a sequence of elements 9, 6, 5, 8, 7, 10 into an empty AVL tree is
A simple graph (a graph without parallel edge or loops) with n vertices and k components can have at most
63 videos|7 docs|165 tests
|
63 videos|7 docs|165 tests
|