An AVL tree is constructed by inserting the following sequence of elements into empty AVL tree. After building an AVL tree, if an element '4' is deleted from it. find how many levels are present in the AVL tree. 7. 4. 9, 5, 4.5. 6. 5.5.5.2
- 4
- 3
- 2
- 1
- option2
Clear All
Loading...
A balance factor in AVL tree is used to check
- what rotation to make.
- when the last rotation occurred.
- if the tree is unbalanced.
- when the last rotation occurred.
- option3
Clear All
Loading...
Given an empty AVL tree, how would you construct AVL tree when a set of numbers are given without performing any rotations?
- find the median of the set of elements B given, make it as root and construct the tree
- just build the tree with the given input
- use trial and error
- use dynamic programming to build the tree
- option1
Clear All
Loading...
What is a full binary tree?
- Each node has exactly two children
- Each node has exactly zero or two children
- Each node has exactly one or two children
- All the leaves are at different levels.
- option2
Clear All
Loading...
If a full binary tree has number of nodes as 63, then the height of the tree is:
- 2
- 4
- 5
- 6
- option3
Clear All
height of tree =2^(h+1);
So,
2^(h+1)=64
2^(h+1)=2^6
h+1=6
h=5
Loading...
If a full binary tree has number of nodes as 31, then the height of the tree is:
- 2
- 4
- 5
- 6
- option2
Clear All
height of tree =2^(h+1);
So,
2^(h+1)=32
2^(h+1)=2^5
h+1=5
h=4
Loading...
A CPU has 24 bit instruction a program started address 600 which of the following is legal program counter value.
- 607
- 608
- 609
- All of the above
- option3
Clear All
Starting address =600
Instructions size=24bit =3 Byte so
next instructions address will be 600+3=603,606,609 and so on
Loading...
A CPU has 8 bit instruction a program started address 600 which of the following is legal program counter value.
- 607
- 608
- 609
- All of the above
- option4
Clear All
8 bit =1 Byte so all address are valid.
Loading...
A CPU has 8 bytes instruction. A program started at address 600. which of the following is legal program counter value.
- 607
- 608
- 609
- All of the above
- option2
Clear All
starting address is 600 and each instructions take 8 bytes so next instructions will be (Base Address+ instructions size) 600+8=608, 616,624 and so on.
Loading...
Consider a processor with 64 registers and an instruction set of size 12. Each instruction has five distinct fields, namely, opcode, two source register identifiers, one destination register identifier, and a twelve-bit immediate value. Each instruction m
- 100
- 200
- 300
- 500
- option4
Clear All
Register size of 64 register=6(2^6)
Opcode size = log 12 = 4bits
Total instructions size = opcode + 3 register size + 12bits
= 4 + 3*6bits + 12bits = 34bits takes 4Bytes in memory so
100 instructions takes = 100*5bits =500 memory
Loading...