Showing 1–10 of 21 questions
in Google Questions
In TCP/IP model, which layer handles IP addresses?
A
Application Layer
B
Transport Layer
C
Internet Layer
D
Link Layer
Correct Answer:
C. Internet Layer
EXPLANATION
The Internet Layer (Layer 3) handles IP addresses and routing. Transport Layer (Layer 4) handles ports.
What does MapReduce do?
A
Reduces maps to a single value
B
Processes large datasets by mapping operations and reducing results
C
Only works with arrays
D
Is used only in front-end development
Correct Answer:
B. Processes large datasets by mapping operations and reducing results
EXPLANATION
MapReduce is a programming model for processing large datasets in parallel by mapping data and then reducing results.
What principle is followed when designing Google's systems?
A
Monolithic architecture
B
Distributed systems with horizontal scalability
C
Centralized database model
D
Sequential processing
Correct Answer:
B. Distributed systems with horizontal scalability
EXPLANATION
Google designs distributed systems that can scale horizontally across many machines to handle billions of requests.
In microservices architecture, what is an API Gateway?
A
A server that stores APIs
B
A single entry point for client requests to multiple microservices
C
A database for API data
D
A security firewall
Correct Answer:
B. A single entry point for client requests to multiple microservices
EXPLANATION
API Gateway is a server that acts as an intermediary between clients and microservices, handling routing, authentication, and load balancing.
What is the correct output of: print(2 ** 3 ** 2) in Python?
EXPLANATION
Exponentiation is right-associative in Python. 32 = 9, then 29 = 512
In dynamic programming, what is memoization?
A
Breaking problem into subproblems
B
Storing results of subproblems to avoid recomputation
C
Creating a memo
D
Sorting results
Correct Answer:
B. Storing results of subproblems to avoid recomputation
EXPLANATION
Memoization is an optimization technique where results of expensive function calls are cached and returned when same inputs occur again.
Which sorting algorithm is stable and has O(n log n) worst-case complexity?
A
QuickSort
B
MergeSort
C
HeapSort
D
Selection Sort
Correct Answer:
B. MergeSort
EXPLANATION
MergeSort has O(n log n) worst-case and is stable. QuickSort is O(n²) worst-case, HeapSort is not stable.
What is the space complexity of QuickSort?
A
O(1)
B
O(log n)
C
O(n)
D
O(n log n)
Correct Answer:
B. O(log n)
EXPLANATION
QuickSort uses O(log n) space for the recursion call stack in the average case.
In a hash table with 10 slots, if 15 elements are inserted with a good hash function, what is the expected average chain length?
EXPLANATION
Load factor = n/m = 15/10 = 1.5. Average chain length in hash table = load factor = 1.5
Which of the following is a programming paradigm Google emphasizes for systems design?
A
Functional Programming
B
Object-Oriented Programming
C
Procedural Programming
D
Both A and B
Correct Answer:
D. Both A and B
EXPLANATION
Google uses both functional and OOP paradigms depending on requirements. Go language (created by Google) supports both paradigms.