CS301 Grand Quiz Latest File Download | Preparation Of Grand Quiz Exams VU Dec 2020 - Vu creator

pinerest claim

Monday, December 28, 2020

CS301 Grand Quiz Latest File Download | Preparation Of Grand Quiz Exams VU Dec 2020

 You know, Due to the prevailing COVID - 19 Pandemic, The Virtual University of Pakistan has decided that an online “Mid Term Quiz / Special Assignment” will be conducted  Mid Term Examinations for the Fall 2020 semester. 

So we decided that we provide you here some most important Grand quiz files For your Mid Exam Help.


In AVL tree during insertion, a single rotation can fix the balance in cases _________ and 4.

1

If a node is inserted in outer side of a node in binary search tree then to make it AVL tree,

We may have to apply single rotation

A zigzag rotation is performed.  In Left-Left case of rotation in AVL tree.

False

The principal benefit of a linked list over a conventional array is that the order of the linked items may be_______ from the order that the data items are stored in memory.

Same

Stack.push(15) will push 15 on _________.

Top of the stack

Suppose we have the following values to be inserted in constructing AVL tree,

10,13,15,5,7,8

Tell when first rotation will take place,

After inserting the node 15

All the objects created using ___________ operator have to be explicitly destroyed using the delete operator.

New

During the execution of a process, operating system constructs four things for that process. Which of the following is not part of that process?

Linked list

There are _________cases of Rotation in AVL tree.

4

Which of the following line of code is incorrect?

Float *I = float new (not confirmed)

In simple or singly linked list there is/are ________ pointer/s in each node.

One

Suppose there are three nodes tree with three numbers 14, 4, 15. Following is not a permutation, or combination for output them.

(4, 4, 15)

The type of expression in which operator succeeds its operands is___________expression.

Postfix

The _________ of a node in a binary tree is defined as the height of its left subtree minus height of its right subtree.

Balance

If both left and right nodes of a node are NULL then this type of node is called a ______ node.

Non leaf (not confirmed)

The function calls are made with the help of__________.

Stack

Which data structure is needed to convert infix expression to postfix expression?

Stack

In case of insertion of right inner node in BST,

Left rotation then right to make AVL

A BST generated from the data in ascending order is ____________.

Linear

Which operation of queue data structure is used to get front element from the queue and then remove it from the queue?

Remove ()

In _________ various cells of memory are not located continuously.

Linked list

The _______ method of list will position the currentNode and lastCurrentNode at the start of the list.

Start

Which operation of queue data structure is used to insert an element into the Queue?

Enqueuer ()

From Operating System point of view, the recursive function calls are made with the help of __________.

Queue

We can make a lexicographic order of characters based on their _____________.

ASCII values

What are the basic things associated with data structures?

All of the above

Consider the following push operations of a Stack:

Stack.push(4);

Stack.push(6);

Stack.push(5);

Stack.push(8);

If a user calls a pop() operation, then which value will be returned?

8 (stack is last in fist out)

~BinarySearchTree( ) is a _______________.

Destructor

Array cells are _________ in computer memory.

Contiguous

Leaf node of binary search tree contains ________

One Null Pointer

dequeue() operation of queue data structure is used to____________

remove an element from the front and return it

The depth of a binary tree is

Maximum level of a leaf

Which of the following operation returns but do not removes top value of the stack?

Top

Which of the following data structure is linear type?

All of above

In doubly linked list a node consists of three parts:

2 pointers and 1 object

Last node in circular linked list contains

No null pointer

A_________ model attempts to model a real-world phenomenon

Simulation

Factorial is an example of __________function.

Recursive

The balance of a node in a binary tree is defined as the height of its _______ sub tree minus height of its right sub tree.

Left

In case of insertion of left outer node in BST,

We first apply left rotation and then rotation to make it an AVL Tree.

int htdiff = height(root->getLeft())   height(root->getRight()); The above line of code is taken from AVL insert method. Complete it by selecting an appropriate symbol.

Minus (-)

Each operator in a postfix expression refers to the previous _______ operand(s).

Two

For making Binary Search Tree for Strings we need, ________ data type.

Int

A _________model attempts to model a real-world phenomenon

Simulation

The lifetime of a transient object cannot exceed that of the application.

True

Which one of the following calling method does not change the original value of the argument in the calling function?

Call by passing the value of the argument

In level-order traversal for Binary Search Tree, we visit the nodes at each level before proceeding to the next level, in a _________ order.

Left-to-right

In doubly linked list a node consists of three parts:

1 pointer and 2 objects

Binary Search Tree voilates the condition of AVL tree when any node has balance equal to

1 or -1

To search an element in ALV tree, it takes maximum 1.88 Log 2n time

True

HOW many cases of rotation are there in AVL tree?

4

__________ tree has been named after two persons Adelson-Velskii and Landis.

AVL

Which of the following is a nonlinear data structure?

Tree

AVL tree is nonlinear data structure.

True

_________ is when function is calling to itself.

Recursion

Which of the following function don't belongs to the stack class?

Crash ()

Which one is the cored function call for the following function of calculating cube?

int cube(int& num)

cube (num)

Binary search algorithm cannot be applied to  ____

None of the given

copy() method of list data structure __________

Set one list to be a copy of another

While implementing non-recursive traversal for Binary Search Tree, we need to implement 

Stack

Following is true in case of using Recursive method calls

The code becomes very short

________is a self-balancing tree.

Binary Search Tree

While implementing stack with an array and to achieve LIFO behavior, we used push and pop elements at

The start of the array

Generalized code written for a class is called

Structure

Army cells are ___________ in computer memory

Contiguous

In singly linked list a node comprises of __________ field/s.

Two

Which of the following statement is false?

Pointers store the next data element of a list

Leaf node of binary search tree contains ________

One null Pointer

What will be the result of evaluating following expression? 5+3*2/(6-3)

7

Want and de-allocatmg memory for linked lest nodes does take hrne than pre-allocated array

MORE

Suppose you are writing a class for Node class and forgot to write the constructor of the class, then

Compiler will automatically generate a default constructor

Factorial is an example of  __________function.

Recursive

A binary tree is said to be a _____ binary tree if every non-leaf node in a binary tree has non-empty left and right subtrees.

Strictly

Memory address is stored in

Pointer

 In level-order traversal for Binary Search Tree, __________ data structure is used.

Queue

 Which of the following is the correct option for priority Queue?

The type of queues that is FIFO i.e. the person who comes first should leave first.

AVL tree is linear data structure.

False

AVL tree is a binary search tree

True

The post order traversal of a binary tree is DEBFCA. Find out the pre order traversal

                               

                                  A

                                  É…

                                                       B    C

                                                       É…   ̸

                              D E F

ABDCEF

In a tree, we link the nodes in such a way that it ___________ a linear structure.

Does not remain

add(12) method of  linked list class will:

Add 12 as value in linked list

Which of the following is the correct conversion of infix to postfix expression?

Z+B-(D-H)/K

ZB+DH-K/-

In singly linked list “next” field of node contains:

Address of next node

Which of the following line of code is incorrect?

The lifetime of a transient object can exceed that of the application which is accessing it.

A list is the collection of items of the _________

same type

back() method of List class is used to:

Moves the “current” pointer to backward one element.

Suppose you are writing a class for Node class and forgot to write the constructor of the class, then

_________ is the maximum height of the AVL tree.

1.44log2n

length() method of List class is used to:

Return the length of the list

 There are four cases of rotation in an __________ tree.

AVL

Allocating and de-allocating memory for linked list nodes does take _________ time than pre-allocated array.

More

________ is utilized at the time of memory allocation in dynamic manner.

Heap

In which case of insertion we require double rotation to make the AVL tree balance.

None

The back() method decreases the value of variable current by __________.

One

In array list the worst case of removing an element is 

To remove the item from start

Left, right, info, and parent are the operations of _________ data structure.

Tree

Which of the following is TRUE for search operations in a binary tree as compared to linked list or an array?

It increase the number of comparison

Which of the following is a correct statement? 

An AVL tree is identical to BST except the height of left and right subtree can differ by at least 1

length() method of List class is used to:

Return the length of the list

Whenever we call a function, the compiler makes a stack, the top element of the stack is _______ of the function.

Return Address

Whenever we call a function, the compiler makes a _________ that it uses to fulfill this function call.

Stack

_______ is the major factor to see the efficiency of a program.

Time

__________ rule applies for evaluating operators of same precedence in an expression

None

The postfix form of the expression A + B * C and (A + B) * C will be _______.

Same

If we use array to implement list, then there is an issue that it gives difficulty when:

We will access value randomly

During in-order traversal using recursive calls, if we found a node is NULL. It means this node will satisfy following condition.

It will not have left child

Which one the following is more closer to AVL tree, (chose the best option)

Binary Search Tree

start() method of List class is used to:

Move the current pointer to first element

Consider the following infix expression.

7/8 + 9

If one converts the above expression into postfix, what would be the resultant expression?

78/9+

In internal memory organization of a process, there is some area of memory for static data that holds ____________ variables.

Both Static and Global

In Left-Right case of rotation in ________ tree. A double rotation is performed.

AVL

If numbers 5, 222, 4, 48 are inserted in a queue, which one will be removed first?

5

Which one is not the property of binary tree?

Sibling node should be same parent (Not Sure)

Each node in singly linked list contains_______

One Pointers

What's wrong with following loop? while( (i < 10) && (i > 24)) { }

The Condition is always false

Download grand quiz File


My today's Grand quiz CS301


1.When an executable program run, it is loaded in the memory and becomes a_______.
Select correct option:
Thread
.h file
Process
None of the above

 

2.A kind of expressions where the operator is present between two operands called ________expressions.
Select correct option:
Infix
Postfix
Prefix
None of the above

 

3.Which of the following operations returns top value of the stack?
Select correct option:
push
pop
top
first

 

4.To create a _________ we link the last node with the first node in the list.
Select correct option:
Double linked list
Circularly-linked list
Linked list
None of the above

 

5.In the calling function, after the execution of the function called, the program continues its execution form the _______after the function call.
Select correct option:
Previous line
Next line
Beginning
None of the above

 

6.Doubly Linked List always has one NULL pointer.
Select correct option:
True
False

7. ________ only removes items in reverse order as they were entered.
Select correct option:
Queue
Stack
Both of these
None of these

 

8.In the linked list implementation of the stack class, where does the push member function places the new entry on the linked list?
Select correct option:
After all other entries that are greater than the new entry.
At the head
After all other entries that are smaller than the new entry.
At the tail

 

9.Which of the following is known as "Last-In, First-Out" or LIFO Data Structure?
Select correct option:
Linked List
Stack
Queue
Tree

 

10.Which boolean expression indicates whether the numbers in two nodes (p and q) are the same. Assume that neither p nor q is null.
Select correct option:
p == q
p.data == q.data
p.nextNode == q. nextNode
p.data =    

1.  Local variables of a function are stored in, 

         Select correct option: 
        Binary Search Tree 
        Stack
        Queue 
        AVL Tree

         2.       Question # 2 of 5 ( Start time: 11:41:31 AM ) 
When an executable program run, it is loaded in the memory and becomes a_______
Select correct option: 
Thread 
.h file 
Process 
None of the above

         3.       In________ the ‘next’ returns false when it reaches to the last node due to the fact that the next field of the last node is set to NULL. 
Select correct option: 
Circular linked list
Triple linked list
Singly linked list

None of the above

         4.        A kind of expressions where the operator is present between two operands called ________expressions. 
Select correct option: 



Infix

Postfix

Prefix

None of the above

         5.       Question # 1 of 5 ( Start time: 11:44:44 AM ) Total Marks: 1 
Compiler uses which one of the following in Function calls, 
Select correct option: 



Stack 

Queue 

Binary Search Tree

AVL Tree

 

         6.        Stack and Queue can be implemented using _______,


                            Select correct option: 



                          Singly Link List

                          Binary Tree

                          Binary Search Tree

                          AVL Tree

7. Which one of the following is TRUE about recursion? 
        Select correct option: 



Recursive function calls consume a lot of memory.


Recursion extensively uses stack memory.

Recursion extensively uses stack memory.

Iteration is more efficient than iteration.

 8. Doubly Linked List always has one NULL pointer. 
Select correct option: 



True

False

 

9. Which boolean expression indicates whether the numbers in two nodes (p and q) are the same. Assume that neither p nor q is null. 
Select correct option: 

p == q 
p.data == q.data 
p.nextNode == q. nextNode 
p.data == q

 

10. Whenever we call a function, the compiler makes a stack, the top element of the stack is _____ of the function. 
Select correct option: 

First argument 
Return address 
Last argument 
None of the above

 

11.

_____ is the stack characteristic but _______was implemented because of the size limitation of the array. 
Select correct option: 

isFull(),isEmpty() 
pop(), push() 
isEmpty() , isFull() 
push(),pop()

 

12.

Each operator in a postfix expression refers to the previous ______ operand(s). 
Select correct option: 

one 
two 
three 
four

13The next field in the last node in a singly-linked list is set to_____
Select correct option: 



NULL 
false

 

 

14.

    The _____ method of list will position the currentNode and lastCurrentNode at the start of the list.
Select correct option:
Remove
Next
Start
Back

15.

______ is the maximum number of nodes that you can have on a stack-linked list ?
Select correct option:
Zero
2n (where n is the number of nodes in linked list)
Any Number
None of these

 

16.

In the linked list implementation of the stack class, where does the push member function places the new entry on the linked list? 
Select correct option: 

After all other entries that are greater than the new entry. 
At the head 
After all other entries that are smaller than the new entry. 
At the tail

 

17. Which of the following operations returns top value of the stack? 
Select correct option: 

push 
pop 
top 
first

 

18. it will be efficient to place stack elements at the start of the list because insertion and removal take _______time. 
Select correct option: 

Variable 
Constant 
Inconsistent 
None of the above

 

19. A template is a function or class that is written with a __________data type. 
Select correct option: 

Specific 
Definite 
Generic 
None of the above.

 

 

20. Local variables of a function are stored in,
Select correct option:
Binary Search Tree
Stack
Queue
AVL Tree

 

 

21. To create a _________ we link the last node with the first node in the list.
Select correct option:
Double linked list
Circularly-linked list
Linked list
None of the above

 

22. In the calling function, after the execution of the function called, the program continues its execution form the _______after the function call.
Select correct option:
Previous line
Next line
Beginning
None of the above

 

23. Which of the following can be used to reverse a string value,
Select correct option:
Stack
Queue
Both of these
None of these

 

24. Question # 4 of 5 ( Start time: 05:32:20 PM ) Total Marks: 1
Each node in doubly link list has,
Select correct option:
1 pointer
2 pointers
3 pointers
4 pointers

 

25. In________ the ‘next’ returns false when it reaches to the last node due to the fact that the next field of the last node is set to NULL.
Select correct option:
Circular linked list
Triple linked list
Singly linked list
None of the above

 

26. only removes items in reverse order as they were entered. 
Select correct option: 

Queue 
Stack 
Both of these 
None of these

 

27. A queue is a ________data structure, whereas a stack is a ________data structure. 
Select correct option: 

FIFO, LIFO 
LIFO,FIFO 
both of these 
none of these

 

28. The principal benefit of a linked list over a conventional array is that the order of the linked items may be_____ from the order that the data items are stored in memory. 
Select correct option: 

Same 
Identical 
Different 
Equivalent

 

29. Whenever we call a function, the compiler makes a stack, the top element of the stack is _____ of the function. 
Select correct option: 

First argument 
Return address 
Last argument 
None of the above

 

 

30. The _____ method of list will position the current Node and lastCurrentNode at the start of the list. 
Select correct option: 

Remove 
Next 
Start 
Back



See the below code and fill the appropriate answer for? void fastInorder(TreeNode* p) { while((p=nexInorder(p)) != ? ) cout p->getInfo(); }

Dummy
rootNode
LTH
RTH

 

If there are N external nodes is a binary tree then what will be the no. of the internal nodes in this binary tree?
N-1
N
N+1
N+2

 

An expression tree will always be a,
Complete binary tree
Binary search tree
Heap AVL tree 

 

When a complete binary tree represented by an array then if right child is at position 5 then left child will be at position _____
2
3
4

 

 Consider a binary tree, represented by the following array: A,B,C,D,E,F,G,I Is it a strictly binary tree ?  
Yes 
No 

 

In a min heap the parent node has key smaller than or equal to

Left child

Right child

Both

None

 

The expression if ( ! heap->isEmpty() ) checks

Heap is empty

Heap is full

Heap is not empty

Not a valid expression (not confirm)

 

We implement the heap by

Threaded Tree
AVL tree
Complete binary tree
Expression 

 

For a perfect binary tree of height h, having N nodes, the sum of heights of nodes is

n-(h-1)

n-(h+1)

n-h

none

 

Traversing a binary tree can only be done using

Recursion

Iteration

Both

none


For a perfect binary tree of height 4. What will be the sum of heights of nodes?
31
3027
26

For a perfect binary tree of height h, having N nodes, the sum of heights of nodes is _____________.

N – (h – 1)
N – (h + 1) 
N – 1
N – 1 + h

If we want to find median of 50 elements, then after applying buildHeap method, how many times deleteMin method will be called ?
5
25
35
50

 

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

increaseKey(p,delta) 
decreaseKey(p,delta)
preculateDown(p,delta)
remove(p,delta)

www.vuzs.net
The main reason of using heap in priority queue is
improve performance 
code is readable
less code
heap can't be used in priority queues

The total number of nodes on 10th level of a perfect binary tree are :

256
512
1024
Can't be determined

Which property of equivalence relation is satisfied if we say: Ahmad R(is related to) Ahmad

Reflexivity
Symmetry 
Transitivity
All of the above

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

increaseKeyHYPERLINK "http://www.vuzs.net/"(HYPERLINK "http://www.vuzs.net/"p,deltaHYPERLINK "http://www.vuzs.net/"
decreaseKey(p,delta)
preculateDown(p,delta)
remove(p,delta)

We can build a heap in _____ time.

Linear 
Exponential
Polynomial
None of the given options

 we can build a heap in linear time using n calls of percolate_down()


If a tree has 50 nodes, then the total edges/links in the tree will be :

55
51
50
49 N-1= 49 

 

 

 

 

            Consider a max heap, represented by the following array; 40,30,20,10,15,16,17,18,4 After inserting a nodes with value 35.Which of following is the updated max heap?

40,30,20,10,15,16,17,8,4,35
40,30,20,10,35,16,17,8,4,15
40,35,20,10,30,16,17,8,4,15
40,35,20,10,15,16,17,18,4,30

 

A Threaded Binary Tree is a binary tree in which every node that does not have a right child has a THREAD (in actual sense, a Link) ___________Successor.

Preorder
Inorder
Postorder
Leveloder

 

Which of the following is a property of binary tree?
A Binary tree with N internal nodes has 2+N links, N-1 links to internal nodes and N+1 links to external nodes
A Binary tree with N internal nodes has 2*N links, N-1 links to internal nodes and N+1 links to external nodes.
A Binary tree with N internal nodes has 2-N links, N-1 links to internal nodes and N+1 links to external nodes.
A Binary tree with N internal nodes has 2N links, N+1 links to internal nodes and N-1 links to external nodes
.

 

A Threaded Binary tree is a binary tree in which every node that does not have a right child has a THREAD (in actual sense, a link)_____________ successor.
Preoder
Inorder
Postorder
Levelorder
 

If there are 56 internal nodes in a binary tree then how many external nodes this binary tree will have?

54
55
56
57

 

Which of the following statement is correct?

A threaded Binary tree is a binary tree in which every node that does not have a left child has a THREAD (in actual sense, a link) to its INORDER successor.
A threaded Binary tree is a binary tree in which every node that does not have a right child has a THREAD (in actual sense, a link) to its PREORDER successor.
A threaded Binary tree is a binary tree in which every node that does not have a left child has a THREAD (in actual sense, a link) to its INORDER successor.
A threaded Binary tree is a binary tree in which every node that does not have a right child has a THREAD (in actual sense, a link) to its POSTORDER predecessor.

 

It is necessary fro Huffman encoding tree to be,

AVL tree
Binary tree
Complete binary Tree
None of these

 

A binary tree with 45 internal nodes has _________ links to external nodes.

44
45
46
90
 

In which of the following tree, parent nodes has key greater than or equal to its both children?

Max heap
Binary search tree
Threaded Binary tree
Complete Binary tree
 

If one pointer of the nodes in a binary tree is NULL then it will be a/an

Inner node
Leaf node
External node
Root node
 

If there are N external nodes is a binary tree then what will be the no. of the internal nodes in this binary tree?
N-1
N
N+1
N+2

 

See the below code and fill the appropriate answer for? Void fastlnorder(TreeNod+p) {while((p+nextInorder(p)) !+ ? ) cout << p->getInfo();}

Dummy
rootNode
LTH
RTH

 

In threaded binary tree, the NULL pointer are replaced by the.
Preorder successor or Predecessor
Inorder successor or predecessor
Postorder successor or predecessor
NULL pointer are not replaced
 

In which of the following tree, parent nodes has a key greater than or equal to its both children?

Max heap
Binary search tree
Threaded Binary three
Complete Binary tree
 

In Complete binary tree the bottom level is filled from _______.

Left to right
Right to left
Not filled at all
None of the given options

 

If the bottom level of a binary tree is NOT completely filled, depicts that the tree is NOT a ________

Complete Binary tree
Threaded Binary Tree
Expression tree
Perfectly compete Binary tree
 

If an expression tree is correct then its root should have,

An operator
(
)
an operand

 

In threaded binary tree, the NULL pointers are replaced by the.

Preorder successor or predecessor
Inorder successor or predecessor
Postorder successor or predecessor
NULL pointer are not replaced
 

A complete binary tree is a tree that is ________ filled, with the possible exception of the bottom level.

Partially
Completely
Incompletely
Partly
 

If the bottom level of a binary tree is not completely filled, depicts that the tree is not a _________.

Expression tree
Threaded binary tree
Complete binary tree
Perfectly complete binary tree
 

An expression tree will always be a,
Complete binary tree
Binary search tree
Heap AVL tree
 

Which of the following is a property of binary tree?
A binary tree of N external nodes has N internal node
A Binary tree of N internal nodes has N+1 external node
A Binary tree of N external nodes has N+1 internal node
A Binary tree of N internal has N-1 external node
 

In a threaded binary tree which nodes have NULL child pointers,
All leaf nodes
Nodes other then leaf nodes
Root Node
None of the nodes

 

In threaded binary tree, the NULL pointers are replaced by the
preorder successor or predecessor
inorder successor or predecessor
postorder successor or predecessor
NULL pointers are not replaced

 

A complete binary tree is a tree that is _______ filled, with the possible exception of the bottom level.
partially
completely
incompletely
partly

 

Which one of the following is TRUE about iteration?
Iterative function calls consumes a lot of memory
Threaded Binary Trees use the concept of iteration
Iteration extensively uses stack memory
Recursion is more efficient than iteration

 

We implement the heap by ____________ .
Threaded Tree
AVL tree
Complete binary tree
Expression

 

Which of the following statement concerning heaps is NOT true?
Traversing a heap in order provides access to the data in numeric or alphabetical order.
Removing the item at the top provides immediate access to the key value with highest (or lowest) priority.
Inserting an item is always done at the end of the array, but requires maintaining the heap property.
A heap may be stored in an array.

 

Which of the following statement concerning heaps is NOT true?
A heap can be stored in a binary search tree.
A heap can be stored in an array.
A heap can be used to implement a priority queue.
A heap can be used to sort data.

 

A complete binary tree is a tree that is _________ filled, with the possible exception of the bottom level.
partially
completely
incompletely
partly

 

By using __________we avoid the recursive method of traversing a Tree, which makes use of stacks and consumes a lot of memory and time.
Binary tree only
Heap data structure
Huffman encoding
 

Which of the following statement is true about dummy node of threaded binary tree?
The left pointer of dummy node points to the itself while the right pointer points to the root of tree.
The left pointer of dummy node points to the root node of the tree while the right pointer points itself i.e. to dummy node.
The left pointer of dummy node points to the root node of the tree while the right pointer is always NULL.
The right pointer of dummy node points to the itself while the left pointer is always NULL.
 

Threaded binary tree

When a complete binary tree, represented by an array then for any array element at position i, the parent is at position ______ .
2i-1
2i
2i+1
floor(i/2) 

When a complete binary tree represented by an array then if right child is at position 5 then left child will be at position _____
2
3
4
6
 

A binary tree with N internal nodes has _____ links, _______ links to internal nodes and ________ links to external nodes.
2N, N-1, N+1
N-1, 2N, N+1
N+1, 2N, N-1
N+1, N-1, 2N
 

If a binary tree has N + 1 external nodes then,
It has N internal nodes
.
It has N-1 internal nodes.
It has N/2 internal nodes.
It has N+2 internal nodes.
 

A binary tree with 45 internal nodes has _______links to external nodes.
44
45
46
90
 

Consider a binary tree, represented by the following array: 10,7,9,5,2,1,6,3,4 This is a ________.
Min heap
Max heap (Not Sure)
Threaded binary tree
Binary Search tree
 Consider a binary tree, represented by the following array: A,B,C,D,E,F,G,I Is it a strictly binary tree ?  
Yes 
No
 

In threaded binary tree the NULL pointers are replaced by the
preorder successor or predecessor
inorder successor or predecessor
inorder successor or predecessor
NULL pointers are not replaced
 

Consider a binary tree, represented by the following array: A,B,C,D,E,F,G,H,I,J,K,L Is it a strictly binary tree?
Yes
No 

We implement the heap by ______________ .
Threaded Tree
AVL tree
Complete binary tree
Expression
 

If there are 56 internal nodes in a binary tree then how many external nodes this binary tree will have?

      
       ► 54
       ► 55
       ► 56
       ► 57

 

Which of the following statements is correct property of binary trees? 

    
       ► A binary tree with N internal nodes has N+1 internal links. 
       ► A binary tree with N external nodes has 2N internal nodes. 
       ► A binary tree with N internal nodes has N+1 external nodes. 
       ► None of above statement is a property of the binary tree. 
 

Which of the following is a property of binary tree?
       ► A binary tree of N external nodes has N internal node.
       ► A binary tree of N internal nodes has N+ 1 external node.
       ► A binary tree of N external nodes has N+ 1 internal node.
       ► A binary tree of N internal nodes has N- 1 external node
.

 

Which of the following statement is true about dummy node of threaded binary tree?
       ► The left pointer of dummy node points to the itself while the right pointer points to the root of tree.
       ► The left pointer of dummy node points to the root node of the tree while the right pointer points itself i.e. to dummy node
       ► The left pointer of dummy node points to the root node of the tree while the right pointer is always NULL.
       ► The right pointer of dummy node points to the itself while the left pointer is always NULL.
 

If the bottom level of a binary tree is NOT completely filled, depicts that the tree is NOT a     
       ► Expression tree
       ► Threaded binary tree
       ► complete Binary tree
       ► Perfectly complete Binary tree

 

 Which of the following statement is correct about find(x) operation: 

       ► A find(x) on element x is performed by returning exactly the same node that is found.
       ►  A find(x) on element x is performed by returning the root of the tree containing x. 
       ►  A find(x) on element x is performed by returning the whole tree itself containing x.
       ► A find(x) on element x is performed by returning TRUE. 

 

If there are 23 external nodes in a binary tree then what will be the no. of internal nodes in this binary tree?

       ► 23
       ► 2
       ► 21
       ► 22

f there are N external nodes in a binary tree then what will be the no. of internal nodes in this binary tree?

       ► N -1
       ► 
N+1
       ► N+2
       ► N

 

Which of the following statement is correct?
       ► 
A Threaded Binary Tree is a binary tree in which every node that does not have a left child has a THREAD (in actual sense, a link) to its INORDER
successor.
       ► A Threaded Binary Tree is a binary tree in which every node that does not have a right child has a THREAD (in actual sense, a link) to its PREOREDR successor.
       ► A Threaded Binary Tree is a binary tree in which every node that does not have a right child has a THREAD (in actual sense, a link) to its INORDER successor.

       ► A Threaded Binary Tree is a binary tree in which every node that does not have a right child has a THREAD (in actual sense, a link) to its POSTORDER successor.
 

By using __________we avoid the recursive method of traversing a Tree, which makes use of stacks and consumes a lot of memory and time.

       ► Binary tree only
       ► Threaded binary tree
       ► 
Heap data structure
       ► Huffman encoding


Consider a min heap, represented by the following array:

10,30,20,70,40,50,80,60

After inserting a node with value 31.Which of the following is the updated min heap?

       ► 10,30,20,31,40,50,80,60,70      
       ► 
10,30,20,70,40,50,80,60,31
       ► 10,31,20,30,40,50,80,60,31
       ► 31,10,30,20,70,40,50,80,60

In complete binary tree the bottom level is filled from ________.

       ► Left to right
       ► 
Right to left
       ► Not filled at all
       ► None of the given options

 

In case of deleting a node from AVL tree, rotation could be prolong to the root node.
       ► Yes
       ► 
No

 

When an array of object is created dynamically then there is no way to provide parameterized constructors for array of objects.
True
Flase

 

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

insert
add
update
preculateDown

 

































CS301 Grand Quiz Latest File Download | Preparation Of Grand Quiz Exams VU Dec 2020 Reviewed by Retry programmer on December 28, 2020 Rating: 5   You know,  Due to the prevailing COVID - 19 Pandemic, The Virtual University of Pakistan has decided that an online “ Mid Term Quiz / Spec...

No comments: