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 40

Fibonacci series: F(n) = F(n-1) + F(n-2). What is F(6) (starting F(0)=0,F(1)=1)?
8
click to copy
Which data structure represents hierarchical data?
Tree
click to copy
AVL tree is a?
Self-balancing BST
click to copy
B-tree is primarily used in?
Database indexing and file systems
click to copy
Red-Black tree is a?
Self-balancing BST with color properties
click to copy
Trie data structure is used for?
String storage and prefix searching
click to copy
Which is NOT a graph traversal algorithm?
Quick sort
click to copy
Dijkstra's algorithm finds?
Shortest path from source to all vertices
click to copy
Dijkstra's algorithm works correctly for?
Graphs with non-negative weights
click to copy
Bellman-Ford handles?
Negative weights (detects negative cycles)
click to copy
Minimum spanning tree connects all vertices with?
Minimum total edge weight
click to copy
Prim's and Kruskal's algorithms find?
Minimum spanning tree
click to copy
Topological sort is applicable to?
Directed Acyclic Graphs (DAGs)
click to copy
Floyd-Warshall algorithm finds?
All-pairs shortest paths
click to copy
Binary heap supports which operations efficiently?
Insert in O(log n), extract-min/max in O(log n)
click to copy
Hashing collision resolution using chaining?
Uses array of linked lists at each bucket
click to copy
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