Question catalog › Coding exercise › Top Interview Questions
Implement a streaming database with the given constraints and requirements.
- Coding exercise
- Top Interview Questions
- Hard
- 15 min
Focus on outlining the architecture of the streaming database, including how data will flow from input sources to storage and retrieval mechanisms. Be specific about the technologies you would use for real-time data ingestion, processing, and querying, such as Apache Kafka, Apache Flink, or similar tools. Address the constraints and requirements provided in the prompt, ensuring that your design meets performance, scalability, and fault tolerance criteria. Discuss potential trade-offs in your design choices and how they align with the use cases of the streaming database. Finally, be prepared to explain how you would handle data consistency and reliability in a streaming context.
How to approach this coding exercise
Clarify the inputs and expected output, explain an approach, and check edge cases. Discuss correctness and complexity before implementing. Use coding practice when your target role requires it.
Practice this question under interview conditions. Answer it out loud against a timer with an AI interviewer that asks follow-ups, then review the scored report.
Return to the question catalog · PM interview preparation guide
Related coding exercises
- Given a factory represented as a 2D grid with some cells blocked and some containing robots, determine if the robots can collectively reach all unblocked cells.Amazon · Coding exercise · Easy
- Given the root of a binary tree, return the length of the diameter of the tree.Google · Coding exercise · Medium
- Given a string of digits from 2 to 9 and the classic phone keypad mapping, return all possible letter combinations the number could represent.Amazon · Coding exercise · Medium
- Find the sum of all elements in a binary tree that fall within the range [low, high], where 'low' and 'high' are integers.Meta · Coding exercise · Easy
- Find the largest perimeter of an island given a two-dimensional array of 1's and 0's representing land and water.Meta · Coding exercise · Medium
- Given a list of items with different sizes, write an algorithm to pack these items into the minimum number of batches without exceeding the capacity of each batch.Amazon · Coding exercise · Easy