Q. Which operation is more expensive in terms of time complexity in AVL trees compared to Red-Black trees?
A.
Insertion
B.
Deletion
C.
Searching
D.
All of the above
Show solution
Solution
Deletion in AVL trees can be more expensive due to the need for multiple rotations to maintain balance.
Correct Answer:
B
— Deletion
Learn More →
Q. Which operation is not allowed in a Red-Black tree?
A.
Insertion
B.
Deletion
C.
Searching
D.
All operations are allowed
Show solution
Solution
All operations (insertion, deletion, searching) are allowed in a Red-Black tree, but they must maintain the tree's properties.
Correct Answer:
D
— All operations are allowed
Learn More →
Q. Which operation is not allowed in a stack?
A.
Push
B.
Pop
C.
Peek
D.
Dequeue
Show solution
Solution
Dequeue is not allowed in a stack as it is a queue operation; stacks only allow push, pop, and peek operations.
Correct Answer:
D
— Dequeue
Learn More →
Q. Which operation is not allowed in an AVL tree?
A.
Insertion
B.
Deletion
C.
Traversal
D.
Duplicate insertion
Show solution
Solution
Duplicate insertion is not allowed in an AVL tree as it must maintain unique keys.
Correct Answer:
D
— Duplicate insertion
Learn More →
Q. Which operation is NOT performed during the insertion in a Red-Black tree?
A.
Coloring the nodes
B.
Rotations
C.
Rebalancing
D.
Sorting the nodes
Show solution
Solution
During insertion in a Red-Black tree, nodes are colored, rotations may occur, and rebalancing is done, but sorting is not part of the insertion process.
Correct Answer:
D
— Sorting the nodes
Learn More →
Q. Which operation is NOT performed in a Red-Black tree during insertion?
A.
Coloring the new node red
B.
Rotating the tree
C.
Recoloring nodes
D.
Removing the root node
Show solution
Solution
Removing the root node is not an operation performed during the insertion process in a Red-Black tree.
Correct Answer:
D
— Removing the root node
Learn More →
Q. Which operation is not typically associated with a stack?
A.
Push
B.
Pop
C.
Enqueue
D.
Peek
Show solution
Solution
Enqueue is an operation associated with queues, not stacks.
Correct Answer:
C
— Enqueue
Learn More →
Q. Which operation is performed to maintain the balance of an AVL tree after an insertion?
A.
Rotation
B.
Recoloring
C.
Splitting
D.
Merging
Show solution
Solution
After an insertion in an AVL tree, rotations (single or double) are performed to maintain the balance of the tree.
Correct Answer:
A
— Rotation
Learn More →
Q. Which operation is performed to maintain the balance of an AVL tree after insertion?
A.
Rotation
B.
Recoloring
C.
Splitting
D.
Merging
Show solution
Solution
Rotations (single or double) are performed to maintain the balance of an AVL tree after an insertion operation.
Correct Answer:
A
— Rotation
Learn More →
Q. Which operation is used to maintain the balance of an AVL tree after insertion?
A.
Recoloring
B.
Rotations
C.
Resizing
D.
Reordering
Show solution
Solution
Rotations are used to maintain the balance of an AVL tree after insertion or deletion operations.
Correct Answer:
B
— Rotations
Learn More →
Q. Which operation may require rebalancing in an AVL tree?
A.
Searching
B.
Insertion
C.
Traversal
D.
Deletion
Show solution
Solution
Insertion may require rebalancing in an AVL tree if it causes the tree to become unbalanced.
Correct Answer:
B
— Insertion
Learn More →
Q. Which operator is used to access the value at the address stored in a pointer?
Show solution
Solution
The '*' operator is used to dereference a pointer and access the value at the address it points to.
Correct Answer:
B
— *
Learn More →
Q. Which optimization algorithm is commonly used to minimize the loss function in neural networks?
A.
Gradient Descent
B.
K-Means
C.
Principal Component Analysis
D.
Random Forest
Show solution
Solution
Gradient Descent is the most commonly used optimization algorithm for minimizing the loss function in neural networks.
Correct Answer:
A
— Gradient Descent
Learn More →
Q. Which optimization algorithm is commonly used to update weights in neural networks?
A.
K-means
B.
Stochastic Gradient Descent
C.
Principal Component Analysis
D.
Random Forest
Show solution
Solution
Stochastic Gradient Descent (SGD) is a popular optimization algorithm used to update weights in neural networks based on the gradient of the loss function.
Correct Answer:
B
— Stochastic Gradient Descent
Learn More →
Q. Which optimization technique can help reduce the number of memory accesses?
A.
Loop fusion
B.
Function inlining
C.
Dead code elimination
D.
Code hoisting
Show solution
Solution
Loop fusion can help reduce the number of memory accesses by combining multiple loops that iterate over the same data.
Correct Answer:
A
— Loop fusion
Learn More →
Q. Which optimization technique can lead to a trade-off between speed and memory usage?
A.
Function inlining
B.
Loop fusion
C.
Code hoisting
D.
Strength reduction
Show solution
Solution
Function inlining can lead to a trade-off between speed and memory usage, as it increases code size but can reduce function call overhead.
Correct Answer:
A
— Function inlining
Learn More →
Q. Which optimization technique focuses on reducing the number of instructions executed?
A.
Loop unrolling
B.
Constant folding
C.
Common subexpression elimination
D.
Code motion
Show solution
Solution
Constant folding focuses on reducing the number of instructions executed by evaluating constant expressions at compile time.
Correct Answer:
B
— Constant folding
Learn More →
Q. Which optimization technique involves removing code that does not affect the program's output?
A.
Loop unrolling
B.
Dead code elimination
C.
Constant folding
D.
Inlining
Show solution
Solution
Dead code elimination is the optimization technique that removes code that does not affect the program's output.
Correct Answer:
B
— Dead code elimination
Learn More →
Q. Which OSI layer is responsible for error detection and correction?
A.
Session Layer
B.
Transport Layer
C.
Data Link Layer
D.
Physical Layer
Show solution
Solution
The Data Link Layer (Layer 2) is responsible for error detection and correction to ensure reliable data transfer.
Correct Answer:
C
— Data Link Layer
Learn More →
Q. Which OSI layer is responsible for establishing, managing, and terminating sessions?
A.
Transport Layer
B.
Session Layer
C.
Presentation Layer
D.
Application Layer
Show solution
Solution
The Session Layer (Layer 5) is responsible for establishing, managing, and terminating sessions between applications.
Correct Answer:
B
— Session Layer
Learn More →
Q. Which parsing technique is generally more powerful, LL or LR?
A.
LL
B.
LR
C.
Both are equally powerful.
D.
Neither is powerful.
Show solution
Solution
LR parsing is generally more powerful than LL parsing as it can handle a larger class of grammars.
Correct Answer:
B
— LR
Learn More →
Q. Which port is commonly used by HTTP?
Show solution
Solution
HTTP commonly uses port 80 for communication.
Correct Answer:
C
— 80
Learn More →
Q. Which property is NOT true for AVL trees?
A.
They are height-balanced.
B.
They allow duplicate values.
C.
They require rebalancing after insertions.
D.
They can have a maximum height of log n.
Show solution
Solution
AVL trees do not allow duplicate values; they maintain unique keys.
Correct Answer:
B
— They allow duplicate values.
Learn More →
Q. Which property is NOT true for Red-Black Trees?
A.
Every node is either red or black
B.
The root is always black
C.
All leaves are red
D.
Red nodes cannot have red children
Show solution
Solution
In Red-Black Trees, all leaves (NIL nodes) are black, not red.
Correct Answer:
C
— All leaves are red
Learn More →
Q. Which property must a Red-Black Tree satisfy?
A.
Every node is either red or black
B.
The root must be red
C.
All leaves must be red
D.
Every red node must have two black children
Show solution
Solution
In a Red-Black Tree, every node must be either red or black, which helps maintain balance.
Correct Answer:
A
— Every node is either red or black
Learn More →
Q. Which protocol is commonly used for dynamic IP address allocation?
A.
ARP
B.
RARP
C.
DHCP
D.
ICMP
Show solution
Solution
DHCP (Dynamic Host Configuration Protocol) is used to dynamically assign IP addresses to devices on a network.
Correct Answer:
C
— DHCP
Learn More →
Q. Which protocol is commonly used for dynamic IP address assignment?
A.
DHCP
B.
DNS
C.
HTTP
D.
FTP
Show solution
Solution
DHCP (Dynamic Host Configuration Protocol) is used to dynamically assign IP addresses to devices on a network.
Correct Answer:
A
— DHCP
Learn More →
Q. Which protocol is commonly used for sending emails?
A.
HTTP
B.
FTP
C.
SMTP
D.
IMAP
Show solution
Solution
SMTP (Simple Mail Transfer Protocol) is the protocol commonly used for sending emails over the internet.
Correct Answer:
C
— SMTP
Learn More →
Q. Which protocol is commonly used to secure HTTP traffic?
A.
FTP
B.
SMTP
C.
HTTPS
D.
Telnet
Show solution
Solution
HTTPS (Hypertext Transfer Protocol Secure) is used to secure HTTP traffic by encrypting the data transmitted between the client and server.
Correct Answer:
C
— HTTPS
Learn More →
Q. Which protocol is commonly used to transfer files over the web?
A.
FTP
B.
SMTP
C.
HTTP
D.
SNMP
Show solution
Solution
HTTP (Hypertext Transfer Protocol) is the primary protocol used for transferring files and data over the web.
Correct Answer:
C
— HTTP
Learn More →
Showing 3061 to 3090 of 3237 (108 Pages)