Notion software engineer interviews cover algorithms, data structures, system design, and coding problems drawn from real interview rounds.
No verified questions yet for Notion.
addImage(imageUrl: str, caption: str) -> None - Adds an image with its caption to the carousel. removeImage(imageUrl: str) -> None - Removes an image from the carousel based on its URL. nextImage() -> str - Moves to the next image and returns the current image's URL. previousImage() -> str - Moves to the previous image and returns the current image's URL. startAutoPlay(interval: int) -> None - Begins automatic transitions at the specified interval (in milliseconds). pauseAutoPlay() -> None - Pauses the automatic transitions. resumeAutoPlay() -> None - Resumes the automatic transitions. addImage("https://example.com/image1.jpg", "First image") addImage("https://example.com/image2.jpg", "Second image") followed by nextImage() nextImage() returns the first image's URL and moves the pointer to the second image.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.twitter = TwitterFeed() and twitter.post(1, 5) and twitter.follow(1, 2) and twitter.getFeed(1)[5]twitter.post(2, 6)[6, 5]1 <= userId, followerId, followeeId <= 10^40 <= tweetId <= 10^4The operations' total number does not exceed 1000.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.cache = LRUCache(2) and cache.put(1, 1) and cache.put(2, 2) and cache.get(1)1cache.put(3, 3)None1 <= capacity <= 30000 <= key, value <= 10^4Sign up for free to access walkthroughs, AI-generated questions, and more.
Get Started Free