In SQL, which JOIN returns only matching records from both tables?
Answer: A
INNER JOIN returns only rows with matching values in both tables. LEFT JOIN includes unmatched left table rows, FULL OUTER JOIN includes all rows, and CROSS JOIN produces Cartesian product.
Q.23Medium
Which data structure is best suited for implementing a LRU (Least Recently Used) cache?
Answer: A
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.
Q.24Easy
What is the time complexity of searching in a balanced binary search tree?
Answer: A
Balanced BSTs (AVL, Red-Black) maintain O(log n) search time by keeping height logarithmic. Unbalanced trees degrade to O(n) in worst case.
Q.25Easy
In cloud computing, what does IaaS stand for?
Answer: A
IaaS provides virtualized computing resources over the internet (AWS EC2, Azure VMs). PaaS and SaaS are higher-level abstractions.
Advertisement
Q.26Medium
Which normalization form eliminates transitive dependencies?
Answer: A
3NF removes transitive dependencies where non-key attributes depend on other non-key attributes. BCNF is stricter but 3NF eliminates transitive dependencies.
Q.27Medium
What is the primary purpose of database replication in distributed systems?
Answer: A
Replication maintains copies across nodes for high availability, disaster recovery, and load distribution. It doesn't eliminate backups—they serve different purposes.
Q.28Easy
In cybersecurity, what is the primary purpose of a firewall?
Answer: A
Firewalls filter traffic based on security policies. While they provide protection, encryption is separate, antivirus is different, and authentication is handled by other systems.
Q.29Medium
Which algorithm is commonly used for sorting in most programming language standard libraries?
Answer: A
Modern languages use Introsort which starts with Quicksort (O(n log n) avg) but switches to Heapsort (O(n log n) worst) to avoid worst-case scenarios.
Q.30Hard
What does CAP theorem state in distributed systems?
Answer: A
CAP theorem (Brewer's theorem) states distributed systems must choose 2 of 3 properties: strong consistency (C), continuous availability (A), or tolerance to network partitions (P).
Q.31Medium
In machine learning basics, what is overfitting?
Answer: A
Overfitting occurs when a model memorizes training data including noise, reducing generalization. Regularization and cross-validation help prevent it.
Q.32Medium
Which of the following is a characteristic of NoSQL databases?
Answer: A
NoSQL databases prioritize flexible schemas and horizontal scaling. They may use eventual consistency (BASE model) rather than strict ACID.
Q.33Medium
What is the purpose of database sharding?
Answer: A
Sharding partitions data based on a key (e.g., user ID) across servers. This horizontal scaling improves performance and handles large datasets efficiently.
Q.34Medium
In AI/ML, what does a neural network's activation function do?
Answer: A
Activation functions (ReLU, Sigmoid, Tanh) add non-linearity, allowing neural networks to learn non-linear relationships. Without them, networks become linear classifiers.
Q.35Medium
Which of the following best describes microservices architecture?
Answer: A
Microservices decompose applications into loosely-coupled, independently deployable services. This enables scalability, flexibility, and technology diversity.
Q.36Medium
What is the purpose of connection pooling in database management?
Answer: A
Connection pooling maintains a pool of reusable connections, reducing the cost of opening/closing connections repeatedly. This significantly improves application performance.
Q.37Hard
In cybersecurity, what is a zero-day vulnerability?
Answer: A
Zero-day vulnerabilities are previously unknown exploits with no patch. They're extremely dangerous because users have no defense until vendors develop and release fixes.
Q.38Medium
Which sorting algorithm is most efficient for nearly sorted data?
Answer: A
Insertion Sort has O(n) best-case complexity for nearly sorted data. Other algorithms don't exploit this, maintaining O(n log n) regardless of initial order.
Q.39Hard
What does BASE model in NoSQL stand for?
Answer: A
BASE is an alternative to ACID, prioritizing availability and partition tolerance. It accepts temporary inconsistencies that resolve eventually (eventual consistency).
Q.40Medium
In cloud security, what is the principle of least privilege?
Answer: A
Least privilege minimizes security risk by restricting access. Users get only permissions needed for their role, reducing damage from compromised accounts.