CS301 Data Structures Quiz 1 Solved - VU Answer

CS301 Data Structures Quiz 1 Solution Answer

Data Structures Quiz Solved. Most of the Important Recent CS301 Quiz 1 Solution for Help in Studies or Exams and Improve Knowledge or Learning Skills. Also, Get PDF File Given Below.


CS301 QUIZ 1 SOLVED


1. For a perfect binary tree of height 4, what will be the sum of highest of node

a) 31

b) 30

c) 27 

d) 26


2. If Ahmed is cousin of Ali and Ali is cousin of Asad then Ahmed is also cousin of Asad. This statement has the following property

a) Reflexivity

b) Symmetry 

c) Transitivity

d) All of the above


3. Which one of the following is NOT the property of equivalence relation?

a) Reflexive

b) Symmetric

c) Transitive 

d) Associative


4. The main reason of using heap in priority queue is 

a) Improve performance

b) Code readable

c) Less code

d) Heap can’t be used in priority queues


5. The total number of nodes on 10th level of perfect binary tree are

 a) 256

b) 512

c) 1024

d) Can’t be determined

6. Suppose there are 100 elements in an equivalence class, so initially there will be 100 trees, the collection of these trees is called .

a) Cluster

b) Class 

c) Forest

d) Bunch


7. The percolate Down procedure will move the smaller value and bigger value.

a) Left, right

b) Right, left

c) Down, up 

d) Up, down


8. For a perfect binary tree of height h, having N nodes, the Sum of height of nodes is  

a) N - h -1

b) N - 1

c) N - 1 + h

d) N - (h - 1)


10. Which of the following method is helpful in creating the heap at once?

a) Insert

b) Add

c) Update

d) percolateDown


11. If ahmad is boss of ehsan and ehsan is boss of umer then ahmad is also boss of umer, the above-mentioned relation is .

a) Reflexive

b) Symmetry 

c) Transitive

d) None of given


12. If we want to find median of 50 elements, then after applying builtHeap method, how many time deleteMin method will be called?

a) 5 

b) 25

c) 35

d) 50


13. Which of the following properties are satisfied by equivalence relationship?

a) Reflexive, symmetric

b) Reflexive, transitive

c) Symmetric, transitive

d) Reflexive, symmetric and transitive


Also Read:


CS301 Past Papers Midterm Solved

CS301 Midterm Notes


CS301 Handouts PDF


14. Sorting procedure normally takes time. 

a) NlogN

b) 2N

c) N*N*N

d) N


15. The Expression

if ( ! heap->isFull() )

Check

a) Heap is empty

b) Heap is full

c) Heap is not empty 

d) Heap is not full


16. The Expression

if ( ! heap->isEmpty() )

Check

a) Heap is empty

b) Heap is full

c) Heap is not empty

d) Not a valid expression


17. Given the values are the array representation of heap: 12 23 26 31 34 44 56 64 78 100

If we perform 4 deleteMin operation, the last element deleted is

a) 31

b) 34

c) 44

d) 56

18. Which of the following heap method increase the value if key at position ‘p’ by the amount ‘delta’?

a) increaseKey(p, delta)

b) decreaseKey(p, delta)

c) percolateDown(p, delta)

d) remove(p, delta)


19. Which of the following heap method lowers the value if key at position ‘p’ by the amount ‘delta’?

a) increaseKey(p, delta) 

b) decreaseKey(p, delta)

c) percolateDown(p, delta)

d) remove(p, delta)


20. Which property of equivalence relation is satisfied if we say:

Ahmad R(is related to)Ahmad 

a) Reflexivity

b) Symmetry

c) Transitivity

d) All of Above


21. Given the values are the array representation of heap; 12 23 26 31 34 44 56 64 78 100

What is the 5th smallest element in the given heap?

a) 31 

b) 34

c) 44

d) 56



Download CS301 Quiz 1 Solution File



Check Also:


All Midterm Papers by Moaaz


Midterm Past Papers by Waqar Siddhu


VU Midterm Short Notes


Post a Comment

0 Comments