Quick Revision

GK One-Line Question & Answer

15541+ short questions with short answers, covering every category and sub-category on the site — no long articles to scroll through. Good for a fast recap before an exam, or a few minutes of daily practice.

Computer Fundamentals → Introduction to Computer 38

Apache Spark is faster than MapReduce because?
In-memory processing instead of disk I/O between stages
click to copy
Directed Acyclic Graph (DAG) in Spark represents?
Task execution plan with dependencies
click to copy
Stream processing vs batch processing: stream processes?
Data in real time as it arrives
click to copy
Apache Kafka is a?
Distributed event streaming platform (message queue)
click to copy
Kafka topic partition allows?
Parallel consumption and horizontal scaling
click to copy
Event sourcing pattern stores?
All state changes as immutable sequence of events
click to copy
CQRS (Command Query Responsibility Segregation) separates?
Read (query) and write (command) data models
click to copy
Saga pattern in microservices handles?
Distributed transactions through sequence of local transactions with compensations
click to copy
Circuit breaker pattern in microservices?
Prevents cascading failures by stopping requests to failing service
click to copy
Service discovery in microservices allows?
Dynamic detection of service instances and their locations
click to copy
Which algorithm detects cycles in a directed graph?
DFS with coloring (White-Gray-Black)
click to copy
Articulation point in a graph is?
Vertex whose removal disconnects the graph
click to copy
Tarjan's algorithm finds?
Strongly Connected Components (SCCs) in directed graph
click to copy
Kosaraju's algorithm for SCCs performs how many DFS passes?
2
click to copy
Maximum flow problem solution includes?
Ford-Fulkerson / Edmonds-Karp algorithm
click to copy
Fenwick tree (Binary Indexed Tree) is used for?
Efficient prefix sum queries and point updates in O(log n)
click to copy
Segment tree supports?
Range queries and range updates in O(log n)
click to copy
Sparse table is used for?
Static range minimum/maximum queries in O(1) after O(n log n) preprocessing
click to copy
Disjoint Set Union (DSU/Union-Find) with path compression and union by rank achieves?
Near O(1) amortized per operation (inverse Ackermann function)
click to copy
Knuth-Morris-Pratt (KMP) string matching algorithm runs in?
O(n+m) using failure function
click to copy
Gradient descent optimization minimizes?
Loss function by iteratively adjusting weights
click to copy
Mini-batch gradient descent uses?
Small random subset of samples per update
click to copy
Adam optimizer combines?
RMSprop and Momentum — adaptive learning rates per parameter
click to copy
Learning rate in neural networks?
Controls step size in weight updates during training
click to copy
Dropout regularization randomly?
Deactivates random neurons during training to prevent overfitting
click to copy
Batch normalization normalizes?
Activations within each mini-batch, stabilizing training
click to copy
Transfer learning uses?
Pre-trained model weights as starting point for new task
click to copy
Attention mechanism in transformers computes?
Weighted sum of values based on query-key similarity
click to copy
Self-attention in transformers?
Computes attention within the same sequence — every token attends to all others
click to copy
GPT models are?
Auto-regressive — generate text left to right using decoder-only transformer
click to copy
Which evaluation metric is used for classification with imbalanced classes?
F1 score (harmonic mean of precision and recall)
click to copy
Precision in classification is?
TP/(TP+FP) — of all predicted positive, how many are actually positive
click to copy
Recall (Sensitivity) is?
TP/(TP+FN) — of all actual positives, how many were correctly identified
click to copy
ROC curve plots?
True Positive Rate vs False Positive Rate at various thresholds
click to copy
AUC (Area Under ROC Curve) of 1.0 means?
Perfect classifier
click to copy
K-fold cross-validation partitions data into?
K folds — train on K-1, validate on 1, repeat K times
click to copy
Which ML algorithm is based on Bayes' theorem?
Naïve Bayes classifier
click to copy
Support Vector Machine (SVM) finds?
Maximum margin hyperplane separating classes
click to copy

Computer Fundamentals → Memory Units 2

Stochastic Gradient Descent (SGD) differs from batch GD in?
Updates weights using single random sample per iteration
click to copy
BERT (Bidirectional Encoder Representations from Transformers) is pre-trained using?
Masked Language Modeling (MLM) and Next Sentence Prediction (NSP)
click to copy