Showing 41–50 of 150 questions
Which normalization form eliminates transitive dependencies?
A
Third Normal Form (3NF)
B
Second Normal Form (2NF)
C
First Normal Form (1NF)
D
Boyce-Codd Normal Form (BCNF)
Correct Answer:
A. Third Normal Form (3NF)
EXPLANATION
3NF removes transitive dependencies where non-key attributes depend on other non-key attributes. BCNF is stricter but 3NF eliminates transitive dependencies.
Which data structure is best suited for implementing a LRU (Least Recently Used) cache?
A
Hash Map + Doubly Linked List
B
Single Array
C
Binary Search Tree
D
Queue only
Correct Answer:
A. Hash Map + Doubly Linked List
EXPLANATION
LRU cache requires O(1) access and O(1) removal/insertion of least-used items. Hash Map provides O(1) lookup, and Doubly Linked List maintains order efficiently.
In machine learning basics, what is the purpose of training data in AI models?
A
To test the final model accuracy
B
To teach the model patterns and make predictions
C
To validate model security
D
To encrypt sensitive information
Correct Answer:
B. To teach the model patterns and make predictions
EXPLANATION
Training data is used to teach AI models to recognize patterns. Test data evaluates accuracy; validation data prevents overfitting.
What is the primary function of a query optimizer in a DBMS?
A
Compile SQL queries into machine code
B
Determine the most efficient execution plan for queries
C
Encrypt sensitive data in queries
D
Validate SQL syntax errors
Correct Answer:
B. Determine the most efficient execution plan for queries
EXPLANATION
The query optimizer analyzes different execution strategies and selects the one with minimal resource consumption and execution time.
Which sorting algorithm has the best average-case time complexity?
A
Bubble Sort - O(n²)
B
Merge Sort - O(n log n)
C
Insertion Sort - O(n²)
D
Selection Sort - O(n²)
Correct Answer:
B. Merge Sort - O(n log n)
EXPLANATION
Merge Sort and Quick Sort have O(n log n) average complexity. Merge Sort guarantees this; Quick Sort can degrade to O(n²) in worst case.
In cybersecurity, what does encryption primarily protect against?
A
Physical theft of devices
B
SQL injection attacks
C
Unauthorized access to data during transmission
D
Database schema changes
Correct Answer:
C. Unauthorized access to data during transmission
EXPLANATION
Encryption converts data into unreadable format, protecting it from unauthorized access during transmission and storage.
What is the primary purpose of database indexing?
A
Increase storage space
B
Improve query performance
C
Reduce security vulnerabilities
D
Eliminate data redundancy
Correct Answer:
B. Improve query performance
EXPLANATION
Indexes speed up data retrieval by creating optimized lookup structures, reducing the number of disk accesses needed to find data.
Which cloud service model provides virtualized computing resources over the internet?
A
SaaS (Software as a Service)
B
IaaS (Infrastructure as a Service)
C
PaaS (Platform as a Service)
D
DaaS (Database as a Service)
Correct Answer:
B. IaaS (Infrastructure as a Service)
EXPLANATION
IaaS provides infrastructure resources (compute, storage, networking). SaaS provides applications, PaaS provides development platforms.
In SQL, what is the difference between INNER JOIN and LEFT JOIN?
A
INNER JOIN returns all rows; LEFT JOIN returns only matching rows
B
INNER JOIN returns only matching rows; LEFT JOIN returns all rows from left table
C
Both are identical in functionality
D
INNER JOIN is faster than LEFT JOIN always
Correct Answer:
B. INNER JOIN returns only matching rows; LEFT JOIN returns all rows from left table
EXPLANATION
INNER JOIN returns only rows with matches in both tables. LEFT JOIN returns all rows from the left table plus matching rows from the right table.
Which data structure is best suited for implementing a priority queue?
A
Stack
B
Queue
C
Heap
D
Linked List
EXPLANATION
A heap (binary heap) efficiently implements priority queues with O(log n) insertion and deletion of minimum/maximum elements.