Summary
I recently had an onsite interview experience with US Staff Infra, which covered system design and coding problems.
Full Experience
Recent Onsite Experience
Design:
- InMemory Key-Value Store and value may not fit in memory
- Aggregate topics from all posts and report top K on dashboard
Code:
- Max Stack(screen)
- Max consecutive ones iii
- "489. Robot Room Cleaner" - start at (0,0) and reach goal (x, y)
Interview Questions (5)
Design an in-memory Key-Value Store where the value associated with a key may not fit entirely in memory, requiring considerations for efficient storage and retrieval.
Design a system to aggregate topics from a large number of posts or data streams and report the top K most frequent or trending topics on a dashboard in real-time.
Implement a MaxStack class which supports standard stack operations (push, pop, top) along with peekMax (return the maximum element in the stack) and popMax (remove and return the maximum element in the stack).
Given a binary array nums and an integer k, return the maximum number of consecutive 1's in the array if you can flip at most k 0's.
You are controlling a robot cleaner that is located in a rectangular room and can move freely. The robot has four API calls: move(), turnLeft(), turnRight(), and clean(). The specific task was to start at (0,0) and navigate the robot to a goal position (x,y). (Referencing LeetCode problem 489)