Notion backend engineer interviews typically focus on APIs, databases, system design, concurrency, caching, and data structures.
No verified questions yet for Notion.
Cache that implements the following methods:__init__(self, capacity: int) -> None - Initializes an empty cache with the given capacity.get(self, pageId: int) -> int - Returns the page content if found, or -1 if not.put(self, pageId: int, content: int) -> None - Adds a new page or updates the content of the existing page. If the capacity is full, it evicts the least recently used page.cache = Cache(2)cache.put(1, 1)cache.put(2, 2)cache.get(1)1capacity will be at least 1 and at most 1000.[-10^4, 10^4].notifyUsers(graph: List[List[int]], userId: int) -> List[int] that returns a list of user IDs that will receive notifications starting from the given userId. The graph represents user relationships as an adjacency list.graph = [[1,2], [0,3], [0], [1]], userId = 1[0, 2, 3]1 <= graph.length <= 10^40 <= userId < graph.lengthgraph[i] is a list of integers representing direct relationships.Sign up for free to access walkthroughs, AI-generated questions, and more.
Get Started Free