Showing 281–290 of 309 questions
Q.281
Medium
Database/SQL
Which of the following best describes a graph data structure with no cycles?
A
Directed Graph
B
Tree
C
Complete Graph
D
Bipartite Graph
Explanation:
A tree is a special case of a graph with no cycles. It has n nodes and n-1 edges, forming a hierarchical structure.
Q.282
Medium
Database/SQL
In machine learning, what does overfitting mean?
A
The model is too simple to learn patterns
B
The model learns training data too well, including noise, reducing generalization to new data
C
The model has too many layers
D
The model requires more training data
Correct Answer:
B. The model learns training data too well, including noise, reducing generalization to new data
Explanation:
Overfitting occurs when a model learns the training data including its noise and irregularities, performing poorly on unseen test data.
Q.283
Medium
Database/SQL
What is the primary advantage of using MongoDB (NoSQL) over traditional relational databases?
A
It provides ACID compliance on all operations
B
It has flexible schema that accommodates unstructured data and horizontal scalability
C
It uses SQL for all queries
D
It requires less storage space
Correct Answer:
B. It has flexible schema that accommodates unstructured data and horizontal scalability
Explanation:
MongoDB's document-based model allows flexible schemas for unstructured data and supports horizontal scaling, unlike rigid relational schemas.
Q.284
Medium
Database/SQL
In operating systems, what is a deadlock?
A
When a process terminates unexpectedly
B
When two or more processes are blocked, each waiting for resources held by the other
C
When memory is exhausted
D
When the CPU stops functioning
Correct Answer:
B. When two or more processes are blocked, each waiting for resources held by the other
Explanation:
Deadlock is a situation where multiple processes cannot proceed because each holds resources needed by others, creating a circular wait condition.
Q.285
Medium
Database/SQL
What is the correct order of operations for the Big O notation from least to most complex?
A
O(1) < O(n) < O(n²) < O(2ⁿ) < O(n!)
B
O(n!) < O(2ⁿ) < O(n²) < O(n) < O(1)
C
O(n) < O(1) < O(n²) < O(2ⁿ) < O(n!)
D
O(log n) > O(1) > O(n) > O(n²)
Correct Answer:
A. O(1) < O(n) < O(n²) < O(2ⁿ) < O(n!)
Explanation:
Constant O(1) is fastest, followed by logarithmic O(log n), linear O(n), quadratic O(n²), exponential O(2ⁿ), and factorial O(n!) which is slowest.
Which cryptographic algorithm is currently recommended by NIST for symmetric encryption?
A
DES (Data Encryption Standard)
B
AES (Advanced Encryption Standard)
C
MD5
D
SHA-1
Correct Answer:
B. AES (Advanced Encryption Standard)
Explanation:
AES is the current NIST standard for symmetric encryption with key sizes of 128, 192, or 256 bits. DES is deprecated due to weak key size.
Which SQL JOIN returns only matching records from both tables?
A
INNER JOIN
B
LEFT JOIN
C
RIGHT JOIN
D
FULL OUTER JOIN
Correct Answer:
A. INNER JOIN
Explanation:
INNER JOIN returns only the records that have matching values in both tables, filtering out non-matching rows.
In database indexing, which structure provides O(log n) search complexity?
A
Linear search
B
B-Tree
C
Hash table with collision
D
Linked list
Correct Answer:
B. B-Tree
Explanation:
B-Tree maintains balanced structure ensuring O(log n) search, insert, and delete operations, commonly used in databases.
Which data structure is best for implementing a priority queue in heapsort algorithm?
A
Stack
B
Queue
C
Heap
D
Array
Explanation:
A heap (min-heap or max-heap) efficiently supports priority queue operations with O(log n) insertion and deletion.
What is the main advantage of cloud computing's elasticity?
A
Lower initial hardware cost
B
Automatic resource scaling based on demand
C
Guaranteed 100% uptime
D
Elimination of all security risks
Correct Answer:
B. Automatic resource scaling based on demand
Explanation:
Elasticity allows automatic resource provisioning and de-provisioning based on real-time demand, reducing costs.