vu cs301 Mid Term - Quiz No.5
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 Mid 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: The tree data structure is a
Linear data structure
Graphical data structure
Non-linear data structure
Data structure like queue
Question 2: We can build a heap in __________ time.
Linear
Exponential
Polynomial
None of the given options
Question 3: Suppose you implement a heap (with the largest element on top) in an array. Consider the different arraysbelow, determine the one that cannot possibly be a heap:
7 6 5 4 3 2 1
7 3 6 2 1 4 5
7 6 4 3 5 2 1
7 3 6 4 2 5 1
Question 4: In which of the traversal method, the recursive calls can be used to traverse a binary tree?
In inorder traversal only
In postorder traversal only
In preorder traversal only
All of the given options
Question 5: The operation for removing an entry from a stack is traditionally called:
delete
peek
pop
remove
Question 7: Here is the start of a C++ class declaration:
class foo
{
public:
void x(foo f);
void y(const foo f);
void z(foo f) const;
__________
Which of the three member functions can alter the PRIVATE member variables of the foo object that activates
the function?
class foo
{
public:
void x(foo f);
void y(const foo f);
void z(foo f) const;
__________
Which of the three member functions can alter the PRIVATE member variables of the foo object that activates
the function?
Only x can alter the private member variables of the object that activates the function
Only y can alter the private member variables of the object that activates the function
Only z can alter the private member variables of the object that activates the function
Two of the functions can alter the private member variables of the object that activates the function
Question 9: Let heap stored in an array as
H = [50, 40, 37, 32, 28, 22, 36, 13].
In other words, the root of the heap contains the maximum element. What is the result of deleting 40 from this heap
H = [50, 40, 37, 32, 28, 22, 36, 13].
In other words, the root of the heap contains the maximum element. What is the result of deleting 40 from this heap
[50,32, 37,13, 28, 22, 36]
[37, 28, 32, 22, 36, 13]
[37, 36, 32, 28, 13, 22]
[37, 32, 36, 13, 28, 22]
Question 10: Following are the linear data structures:
Stacks
Queues
Both a & b
None of the above