vu cs301 Final Term - Quiz No.18
vu cs301 Data Structures Quiz
This quiz belongs to book/course code vu cs301 Data Structures of vu organization. We have 40 quizzes available related to the book/course Data Structures. This quiz has a total of 10 multiple choice questions (MCQs) to prepare and belongs to topic Final Term. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to prepare online MCQs and quizzes.
NVAEducation also facilitates users to contribute in online competitions with other students to make a challenging situation to learn in a creative way. You can create one to one, and group competition on an topic of a book/course code. Also on NVAEducation you can get certifications by passing the online quiz test.
Question 1: Do you see any problem in the code of nextInOrder below:
TreeNode * nextInorder(TreeNode * p) { if(p->RTH == thread) return( p->R ); else { p = p->R; while(p->LTH == child) p = p->R; return p; } }
The function has no problem and will fulfill the purpose successfully
The function cannot be compile as it has syntax error
The function has logical problem, therefore, it will not work properly
The function will be compiled but will throw runtime exception immediately after the control is transferred to this function
Question 2: Binary Search Tree voilates the condition of AVL tree when any node has balance equal to
2 or -2
1 or -1
0
None of the options.
Question 3: In case of insertion of right inner node in BST __________.
we need to apply single left rotation to make it AVL tree.
we need to apply single right rotation to make it AVL tree.
single left rotation first and then single right rotation to make it AVL tree.
single right rotation first and then single left rotation to make it AVL tree.
Question 4: Ahmad R(is related to) Ahmad
Reflexivity
Symmetry
Transitivity
All of the given
Question 5: While building Huffman encoding tree the new node that is the result of joining two nodes has the frequency.
Equal to the small frequency
Equal to the greater
Equal to the sum of the two frequencies
Equal to the difference of the two frequencies
Question 6: Binary Search can be categorized into which of following?
Greedy algorithm
Dynamic programming
Divide and conquer
Brute Force technique
Question 8: The percolateDown procedure will move the smaller value __________ and bigger value __________.
left, right
right, left
down, up
up, down
Question 9: Gillette was the first marketer of disposable razors to offer a product specifically designed for men. This is an example of segmentation using which of the following variables?
Demographic
Psychographic
Geographic
Product use
Question 10: which of the following function don't belongs to the stack class?
push()
pop()
crash()
top()