

InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
1. |
Prim’s algorithm can be implemented using _______(a) a stack data structure(b) radix sort(c) priority queue data structure(d) bubble sortI have been asked this question in a national level competition.My query is from Spanning Trees in division Trees of Discrete Mathematics |
Answer» Correct answer is (c) priority QUEUE data structure |
|
2. |
In a maximum spanning tree the weighted graph is of _______(a) maximum number of edges(b) maximum number of cyclic trees(c) minimum number of vertices(d) maximum weightThe question was asked in an online interview.This key question is from Spanning Trees in chapter Trees of Discrete Mathematics |
Answer» Correct OPTION is (d) maximum weight |
|
3. |
The spanning tree will be maximally acyclic if ____________(a) one additional edge makes a cycle in the tree(b) two additional edges makes a cycle in the tree(c) removing one edge makes the tree cycle free(d) removing two edges make the tree cycle freeI have been asked this question in final exam.My question is based upon Spanning Trees topic in chapter Trees of Discrete Mathematics |
Answer» Right CHOICE is (a) one ADDITIONAL edge makes a CYCLE in the TREE |
|
4. |
A complete undirected graph of n nodes can have maximum ______ spanning trees.(a) n^n+1(b) n^n-2(c) \(\frac{n(n+1)}{2}\)(d) nThe question was posed to me during an online exam.Enquiry is from Spanning Trees topic in chapter Trees of Discrete Mathematics |
Answer» The correct OPTION is (b) n^n-2 |
|
5. |
An immediate application of minimum spanning tree ______(a) gesture analysis(b) handwriting recognition(c) fingerprint detection(d) soft computingI got this question by my school teacher while I was bunking the class.Query is from Spanning Trees in division Trees of Discrete Mathematics |
Answer» RIGHT choice is (b) handwriting recognition The best I can EXPLAIN: Minimum spanning tree is the spanning tree where the cost is minimum among all the spanning trees. It is used in network designing, in the algorithms predicting the TRAVELLING salesman problem,multi-terminal minimum CUT problem and minimum-cost weighted PERFECT matching. It can also used in Handwriting recognition and image segmentation. |
|
6. |
If minimum cost edge of a graph is unique, then that edge will be added to any MST. Choose the correct option.(a) false(b) maximum cost edge is added(c) true(d) minimum cost edge need not be uniqueI got this question in examination.This question is from Spanning Trees in portion Trees of Discrete Mathematics |
Answer» Right option is (c) true |
|
7. |
Time complexity of Prim’s algorithm is _________(a) O((V+E)logV)(b) O(E+V)(c) O(E)(d) O(V+1)I have been asked this question by my school teacher while I was bunking the class.Question is from Spanning Trees in division Trees of Discrete Mathematics |
Answer» Correct choice is (a) O((V+E)logV) |
|
8. |
For every spanning tree with n vertices and n edges what is the least number of different Spanning trees can be formed?(a) 2(b) 5(c) 3(d) 4I have been asked this question in semester exam.This question is from Spanning Trees in portion Trees of Discrete Mathematics |
Answer» Correct option is (c) 3 |
|
9. |
What is the time complexity of Kruskal’s algorithm?(a) O(ElogV)(b) O(V+logE)(c) O(E+1)(d) O(V^2)I got this question in an online interview.This question is from Spanning Trees in division Trees of Discrete Mathematics |
Answer» Right answer is (a) O(ElogV) |
|
10. |
If the weight of an edge e of cycle C in a graph is larger than the individual weights of all other edges of C, then that edge ________(a) belongs to an minimum spanning tree(b) cannot belong to an minimum spanning tree(c) belongs to all MSTs of the graph(d) can not belong to the graphI had been asked this question in an international level competition.Query is from Spanning Trees in chapter Trees of Discrete Mathematics |
Answer» Correct CHOICE is (b) cannot BELONG to an minimum spanning tree |
|
11. |
Prefix expression can be evaluated _________(a) from right to left(b) from left to right(c) from the exact middle(d) from second right elementThis question was posed to me in an interview for job.This is a very interesting question from Trees topic in section Trees of Discrete Mathematics |
Answer» Correct choice is (B) from left to right |
|
12. |
Spanning trees have a special class of depth-first search trees named _________(a) Euclidean minimum spanning trees(b) Tremaux trees(c) Complete bipartite graphs(d) Decision treesThis question was addressed to me in homework.Question is taken from Spanning Trees topic in division Trees of Discrete Mathematics |
Answer» RIGHT choice is (B) Tremaux trees Explanation: A tremaux tree of an undirected graph G is a SPANNING tree of G which is rooted at one of its vertices with the property that every two adjacent vertices in G are related to each other as an ancestor and descendant in the tree. |
|
13. |
What is the postfix expression of the given expression, (2*4-(5+7/3^4)-8)10?(a) 2 4 5 * 7 3 4 ^ / + 8 – – 10(b) 2 4 * ^ 5 7 3 4 / + 8 10 – –(c) 2 4 * 5 7 ^ 3 4 / + – 8 10 –(d) 2 4 * 5 7 3 4 ^ / + – 8 – 10The question was asked during an interview.This is a very interesting question from Trees topic in chapter Trees of Discrete Mathematics |
Answer» The correct answer is (d) 2 4 * 5 7 3 4 ^ / + – 8 – 10 |
|
14. |
What is the postfix expression of (A+B)-C*(D/E))+F?(a) A B + C D E / * – F +(b) A B CD E + / * F – +(c) A B C + * D E /F + –(d) A B + C – * D E / F +This question was addressed to me during a job interview.I'd like to ask this question from Trees topic in section Trees of Discrete Mathematics |
Answer» The correct choice is (a) A B + C D E / * – F + |
|
15. |
Conversion from prefix to postfix expression can be done _______________(a) using bubble sort(b) using radix sort(c) using two queues(d) in a direct mannerI got this question in an international level competition.I'm obligated to ask this question of Trees in division Trees of Discrete Mathematics |
Answer» Correct CHOICE is (d) in a direct manner |
|
16. |
Infix to prefix conversion can be done using __________(a) two queues(b) two stacks(c) one stack and two queues(d) one stackI have been asked this question during an online interview.My question is from Trees in section Trees of Discrete Mathematics |
Answer» Right choice is (b) two stacks |
|
17. |
What is the postfix expression of 9+3*5/(10-4)?(a) 9 3 + * 5 / 10 4 –(b) 9 3 5 + * / 10 4 –(c) 9 3 + 5 * / 10 4 –(d) 9 3 5 * / + 10 – 4This question was posed to me in an internship interview.Enquiry is from Trees topic in division Trees of Discrete Mathematics |
Answer» RIGHT ANSWER is (c) 9 3 + 5 * / 10 4 – For explanation I would say: The EXPRESSION, 9+3*5/(10-4) = 9+3*5/(10 4-) = 9+35/*(10 4-) = 935/*+(10 4-) So the output is:9 3 5 / * + 10 4 -. |
|
18. |
Evaluation of 4*5+3/2-9 inprefix notation.(a) *45-/32+9(b) *+453/-29(c) -+*45/329(d) *+/45932I had been asked this question in quiz.This key question is from Trees in section Trees of Discrete Mathematics |
Answer» Correct choice is (c) -+*45/329 |
|
19. |
Evaluation of expression a/b+c*d-e in postfix notation.(a) ab+cd/*-e(b) ab/cd*+e-(c) abc/+d*-e(d) abcd/+*-eThis question was posed to me by my school principal while I was bunking the class.I need to ask this question from Trees topic in section Trees of Discrete Mathematics |
Answer» CORRECT ANSWER is (B) AB/cd*+E- Explanation: The expression=a/b+c*d-e ={(ab/)+(cd*)}-e ={(ab/)(cd*)+}-e ={(ab/)(cd*)+}e- So the output is:ab/cd*+e- |
|
20. |
Worst case complexity of Breadth First Search traversal __________(a) O(n*n)(b) O(nlogn)(c) O(n^2 logn)(d) O(n^3)The question was asked in my homework.Question is from Tree Traversal topic in portion Trees of Discrete Mathematics |
Answer» Correct CHOICE is (b) O(nlogn) |
|
21. |
Breadth First Search traversal of a binary tree finds its application in __________(a) Cloud computing(b) Peer to peer networks(c) Weighted graph(d) Euler pathI had been asked this question by my college director while I was bunking the class.Origin of the question is Tree Traversal topic in division Trees of Discrete Mathematics |
Answer» Right answer is (b) PEER to peer NETWORKS |
|
22. |
An immediate application of a Depth First Search traversal is __________(a) count the number of leaf nodes(b) perform Inorder traversal in easy way(c) count number of nodes(d) implement preorder traversalI have been asked this question by my school principal while I was bunking the class.Query is from Tree Traversal in section Trees of Discrete Mathematics |
Answer» Right option is (a) count the number of LEAF NODES |
|
23. |
The time complexity of calculating the sum of all leaf nodes in an n-order binary tree is __________(a) O(n^2)(b) O(n+1)(c) O(1)(d) O(n)The question was asked in an interview for internship.The query is from Tree Traversal topic in chapter Trees of Discrete Mathematics |
Answer» | |
24. |
For the expression (7-(4*5))+(9/3) which of the following is the post order tree traversal?(a) *745-93/+(b) 93/+745*-(c) 745*-93/+(d) 74*+593/-This question was addressed to me in unit test.This is a very interesting question from Tree Traversal in portion Trees of Discrete Mathematics |
Answer» Right choice is (c) 745*-93/+ |
|
25. |
What is the minimum height for a binary search tree with 60 nodes?(a) 1(b) 3(c) 4(d) 2I had been asked this question during an online exam.My question is from Tree Traversal in division Trees of Discrete Mathematics |
Answer» Right option is (d) 2 |
|
26. |
An important application of binary tree is ______(a) Huffman coding(b) stack implementation(c) queue implementation(d) traverse a cyclic graphThe question was asked by my school principal while I was bunking the class.I need to ask this question from Tree Traversal in section Trees of Discrete Mathematics |
Answer» RIGHT choice is (a) Huffman coding Explanation: A binary tree is USED to sort a list of ELEMENTS; the inorder traversal will do this automatically. Better tree sorting algorithm will involve balancing the trees. The binary coding, in particular for the Huffman coding is an immediate application of binary trees. |
|
27. |
Topological sorting of a graph represents _______ of a graph.(a) linear probing(b) linear ordering(c) quadrilateral ordering(d) insertion sortingI got this question in an interview.My query is from Trees in portion Trees of Discrete Mathematics |
Answer» Correct answer is (B) linear ordering |
|
28. |
In preorder traversal of a binary tree the second step is ____________(a) traverse the right subtree(b) traverse the left subtree(c) traverse right subtree and visit the root(d) visit the rootThe question was posed to me in my homework.The query is from Tree Traversal topic in section Trees of Discrete Mathematics |
Answer» Correct option is (b) TRAVERSE the left subtree |
|
29. |
The time complexity to find shortest distances by using Dijkstra’s algorithm is __________(a) O(E^2)(b) O(V+1-E)(c) O(V+E)(d) O(E+VlogV)I have been asked this question in final exam.I'd like to ask this question from Trees topic in portion Trees of Discrete Mathematics |
Answer» Correct OPTION is (d) O(E+VlogV) |
|
30. |
The time complexity to find a Eulerian path in a graph of vertex V and edge E is _____________(a) O(V^2)(b) O(V+E-1)(c) O(V+E)(d) O(E+1)I had been asked this question in an online quiz.My question is taken from Trees in portion Trees of Discrete Mathematics |
Answer» Right choice is (C) O(V+E) |
|
31. |
How many cycles are there in a wheel graph of order 5?(a) 6(b) 10(c) 25(d) 7I have been asked this question during an online interview.This interesting question is from Trees in division Trees of Discrete Mathematics |
Answer» Right option is (d) 7 |
|
32. |
How many edges are there in a complete graph of order 9?(a) 35(b) 36(c) 45(d) 19I had been asked this question during an interview for a job.My doubt is from Trees in chapter Trees of Discrete Mathematics |
Answer» Right answer is (b) 36 |
|
33. |
If G is a simple graph with n-vertices and n>=3, the condition for G has a Hamiltonian circuit is __________(a) the degree of each vertex is at most n/2(b) the degree of each vertex is equal to n(c) the degree of every vertex is at least n+1/2(d) the degree of every vertex in G is at least n/2I have been asked this question in class test.The above asked question is from Trees topic in chapter Trees of Discrete Mathematics |
Answer» The correct option is (d) the degree of EVERY VERTEX in G is at least n/2 |
|
34. |
What is a separable graph?(a) A disconnected graph by deleting a vertex(b) A disconnected graph by removing an edge(c) A disconnected graph by removing one edge and a vertex(d) A simple graph which does not contain a cycleThe question was posed to me during an online interview.My question comes from Trees in division Trees of Discrete Mathematics |
Answer» Right OPTION is (a) A disconnected GRAPH by DELETING a vertex |
|
35. |
A binary cycle space forms a ______ over the two element field.(a) triangular graph(b) vector space(c) binary tree(d) hamiltonian graphI got this question at a job interview.I need to ask this question from Trees topic in section Trees of Discrete Mathematics |
Answer» Correct option is (b) vector SPACE |
|
36. |
For an n-vertex undirected graph, the time required to find a cycle is ____________(a) O(n)(b) O(n^2)(c) O(n+1)(d) O(logn)This question was addressed to me during an internship interview.I'm obligated to ask this question of Trees in division Trees of Discrete Mathematics |
Answer» Right answer is (a) O(n) |
|
37. |
If two cycle graphs Gm and Gn are joined together with a vertex, the number of spanning trees in the new graph is ______(a) m+n-1(b) m-n(c) m*n(d) m*n+1This question was posed to me in my homework.This question is from Trees in chapter Trees of Discrete Mathematics |
Answer» Correct option is (c) m*n |
|
38. |
What is a bipartite graph?(a) a graph which contains only one cycle(b) a graph which consists of more than 3 number of vertices(c) a graph which has odd number of vertices and even number of edges(d) a graph which contains no cycles of odd lengthI have been asked this question by my school teacher while I was bunking the class.The doubt is from Properties of Tree topic in division Trees of Discrete Mathematics |
Answer» The correct answer is (d) a graph which CONTAINS no cycles of odd LENGTH |
|
39. |
A graph which consists of disjoint union of trees is called ______(a) bipartite graph(b) forest(c) caterpillar tree(d) labeled treeThis question was addressed to me during an interview for a job.The query is from Properties of Tree topic in portion Trees of Discrete Mathematics |
Answer» | |
40. |
Two labeled trees are isomorphic if ____________(a) graphs of the two trees are isomorphic(b) the two trees have same label(c) graphs of the two trees are isomorphic and the two trees have the same label(d) graphs of the two trees are cyclicI had been asked this question in my homework.Enquiry is from Properties of Tree in section Trees of Discrete Mathematics |
Answer» Right option is (c) graphs of the two trees are isomorphic and the two trees have the same label |
|
41. |
In an n-ary tree, each vertex has at most ______ children.(a) n(b) n^4(c) n*n(d) n-1This question was posed to me during an interview.This key question is from Properties of Tree topic in chapter Trees of Discrete Mathematics |
Answer» Right answer is (a) n |
|
42. |
A linear graph consists of vertices arranged in a line.(a) false(b) true(c) either true or false(d) cannot determinedThis question was posed to me during an interview.The question is from Properties of Tree in chapter Trees of Discrete Mathematics |
Answer» Correct answer is (b) true |
|
43. |
The tree elements are called __________(a) vertices(b) nodes(c) points(d) edgesThe question was asked during an internship interview.My question comes from Properties of Tree topic in chapter Trees of Discrete Mathematics |
Answer» Right CHOICE is (b) nodes |
|
44. |
A polytree is called _______________(a) directed acyclic graph(b) directed cyclic graph(c) bipartite graph(d) connected graphThe question was posed to me in a job interview.My question is taken from Properties of Tree topic in chapter Trees of Discrete Mathematics |
Answer» Correct option is (a) directed acyclic graph |
|
45. |
What is a star tree?(a) A tree having a single internal vertex and n-1 leaves(b) A tree having n vertices arranged in a line(c) A tree which has 0 or more connected subtrees(d) A tree which contains n vertices and n-1 cyclesThe question was asked in an online interview.This intriguing question comes from Properties of Tree topic in chapter Trees of Discrete Mathematics |
Answer» The correct choice is (a) A TREE having a single INTERNAL VERTEX and n-1 LEAVES |
|
46. |
An n-vertex graph has ______ edges.(a) n^2(b) n-1(c) n*n(d) n*(n+1)/2This question was addressed to me in exam.I would like to ask this question from Properties of Tree topic in chapter Trees of Discrete Mathematics |
Answer» Correct answer is (b) n-1 |
|
47. |
An undirected graph G which is connected and acyclic is called ____________(a) bipartite graph(b) cyclic graph(c) tree(d) forestThe question was posed to me during an interview for a job.I want to ask this question from Properties of Tree in section Trees of Discrete Mathematics |
Answer» Correct answer is (c) tree |
|