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 37

Open addressing collision resolution?
Probes for next empty slot in the table
click to copy
Load factor of a hash table is?
Number of elements / Table size
click to copy
Dynamic array (ArrayList/Vector) resizing typically?
Doubles in size
click to copy
Circular queue vs linear queue: circular queue?
Reuses vacated front positions
click to copy
Deque stands for?
Doubly ended queue
click to copy
Which algorithm uses divide and conquer to multiply large integers?
Karatsuba algorithm
click to copy
Euclid's algorithm computes?
GCD (Greatest Common Divisor)
click to copy
Sieve of Eratosthenes is used to?
Find all prime numbers up to n
click to copy
Kth largest element problem can be solved optimally using?
Min-heap of size k in O(n log k)
click to copy
Which of the following is a stable sorting algorithm?
Merge sort
click to copy
In-place sorting algorithm uses?
O(1) extra space
click to copy
Counting sort works for?
Integer data within known range
click to copy
Radix sort time complexity is?
O(nk) where k is digit count
click to copy
Bucket sort works best when input is?
Uniformly distributed across a range
click to copy
P class problems are?
Solvable in polynomial time
click to copy
NP-complete problems are?
Both in NP and as hard as any problem in NP
click to copy
Traveling Salesman Problem (TSP) is?
NP-hard
click to copy
Approximation algorithm provides?
Solution within guaranteed factor of optimal
click to copy
Brute force algorithm?
Tries all possibilities exhaustively
click to copy
Heuristic algorithm?
Finds good (not necessarily optimal) solution quickly
click to copy
Genetic algorithm is inspired by?
Evolution and natural selection
click to copy
Simulated annealing is inspired by?
Metal annealing process in physics
click to copy
Finite State Machine (FSM) has?
Finite set of states with transitions
click to copy
Regular expressions are used for?
Pattern matching in strings
click to copy
Context-free grammar is used in?
Compiler design for syntax analysis
click to copy
Lexical analysis in compilers?
Breaks source code into tokens (lexemes)
click to copy
Semantic analysis in compiler?
Checks meaning and type correctness
click to copy
Code generation in compiler?
Produces target machine code or assembly
click to copy
Which of the following is a midterm memory?
RAM
click to copy
RISC processors typically have?
Fixed-length instructions, large register file
click to copy
Instruction pipelining improves?
CPU throughput by overlapping execution stages
click to copy
Hazards in CPU pipelining include?
Data, control, and structural hazards
click to copy
Speculative execution in CPUs?
Executes instructions before knowing if needed (branch prediction)
click to copy
Meltdown and Spectre are?
CPU vulnerabilities exploiting speculative execution
click to copy
Which is true about 64-bit vs 32-bit OS?
64-bit can address more RAM
click to copy
Endian conversion is needed when?
Different endian systems exchange data
click to copy
IEEE 754 double precision uses?
64 bits
click to copy

Computer Fundamentals → Software and Hardware 3

Parsing in compiler design?
Analyzes grammatical structure of source code
click to copy
Code optimization in compiler aims to?
Improve execution speed and reduce resource usage
click to copy
Symbol table in compiler stores?
Identifiers with type and scope information
click to copy