Showing 11–20 of 150 questions
Which normalization form eliminates all non-key dependencies?
EXPLANATION
3NF (Third Normal Form) ensures all non-key attributes depend only on the primary key, eliminating transitive dependencies.
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.
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.
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.
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.
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.
Which cloud service model provides pre-configured application environments?
A
IaaS (Infrastructure as a Service)
B
PaaS (Platform as a Service)
C
SaaS (Software as a Service)
D
DaaS (Database as a Service)
Correct Answer:
B. PaaS (Platform as a Service)
EXPLANATION
PaaS provides a complete development and deployment environment in the cloud, including pre-configured tools and frameworks.
What does ACID compliance in databases ensure?
A
Data is always encrypted
B
Atomicity, Consistency, Isolation, and Durability of transactions
C
Automatic data compression
D
Asynchronous data backup
Correct Answer:
B. Atomicity, Consistency, Isolation, and Durability of transactions
EXPLANATION
ACID is a fundamental database property: Atomicity (all-or-nothing), Consistency (valid state), Isolation (concurrent independence), Durability (permanent after commit).
Which sorting algorithm has the best average-case time complexity for randomly distributed data?
A
Bubble Sort - O(n²)
B
Quick Sort - O(n log n)
C
Insertion Sort - O(n²)
D
Selection Sort - O(n²)
Correct Answer:
B. Quick Sort - O(n log n)
EXPLANATION
Quick Sort has O(n log n) average-case complexity, making it most efficient for random data. Though worst-case is O(n²), randomized pivot selection minimizes this risk.
Which of the following is a correct SQL syntax for creating an index on multiple columns?
A
CREATE INDEX idx_name ON table_name (col1, col2);
B
CREATE UNIQUE INDEX idx_name ON table_name (col1, col2);
C
CREATE INDEX idx_name ON table_name COLUMNS (col1, col2);
D
Both A and B are correct
Correct Answer:
D. Both A and B are correct
EXPLANATION
Both syntaxes are valid in SQL. The first creates a composite index, while the second creates a unique composite index.