Notion logo

Notion Software Engineer System Design Questions

28 practice questions for Notion Software Engineer interviews

Notion software engineer interviews cover algorithms, data structures, system design, and coding problems drawn from real interview rounds.

All Roles Software Engineer Backend Engineer Frontend Engineer Full Stack Engineer Mobile Engineer Data Engineer Data Scientist ML Engineer DevOps Engineer DevOps Engineer Product Manager SRE Security Engineer Engineering Manager Data Analyst UX/UI Designer QA Engineer

No verified questions yet for Notion.

system design Senior api design #1

1. [OA] Twitter Feed — Design a minimal backend for Notion-like collaborative posting

Design a class structure that simulates a collaborative posting system similar to a Twitter feed in Notion. Users should be able to post messages, follow each other, and retrieve feeds from followed users in the correct order.
Class Signature:
- class TwitterFeed:
- def __init__(self): Initializes the Twitter feed object.
- def post(self, userId: int, tweetId: int) -> None: Posts a tweet for a user.
- def follow(self, followerId: int, followeeId: int) -> None: Allows follower to follow a followee.
- def unfollow(self, followerId: int, followeeId: int) -> None: Allows follower to unfollow a followee.
- def getFeed(self, userId: int) -> List[int]: Retrieves the 10 most recent tweet IDs in the order they were posted.
Example 1:
Input: twitter = TwitterFeed() and twitter.post(1, 5) and twitter.follow(1, 2) and twitter.getFeed(1)
Output: [5]
Explanation: User 1 posts a tweet and follows user 2.
Example 2:
Input: twitter.post(2, 6)
Output: [6, 5]
Explanation: User 2 posts a tweet, and user 1 gets the feed with both tweets in the right order.
Constraints:**
- 1 <= userId, followerId, followeeId <= 10^4
- 0 <= tweetId <= 10^4
- The operations' total number does not exceed 1000.
system design Senior caching #2

2. [OA] LRU Cache — Implement caching for Notion's API responses

In Notion, caching is critical for performance, especially for frequent API requests. Implement an LRU (Least Recently Used) Cache to store API responses and efficiently handle eviction of the least recently accessed items.
Class Signature:
- class LRUCache:
- def __init__(self, capacity: int): Initializes the LRU Cache with a capacity.
- def get(self, key: int) -> int: Fetches the value from the cache.
- def put(self, key: int, value: int) -> None: Updates the cache with a new key-value pair or updates the value if the key exists.
Example 1:
Input: cache = LRUCache(2) and cache.put(1, 1) and cache.put(2, 2) and cache.get(1)
Output: 1
Explanation: Cache contains {1=1, 2=2} and fetching key 1 returns 1.
Example 2:
Input: cache.put(3, 3)
Output: None
Explanation: Previously added key 2 will be evicted due to LRU policy.
Constraints:
- 1 <= capacity <= 3000
- 0 <= key, value <= 10^4

Related Notion Software Engineer interview prep

Start practicing Notion questions

Sign up for free to access walkthroughs, AI-generated questions, and more.

Get Started Free