Notion frontend engineer interviews emphasise JavaScript, DOM manipulation, CSS, accessibility, browser APIs, and UI component architecture.
No verified questions yet for Notion.
n changes made on the page with the given timestamps.user, a string change, and an integer timestamp. Implement a ChangeLog class, which maintains the n most recent changes in their chronological order. The class should support the following methods:addChange(user: str, change: str, timestamp: int): Adds a new change to the log.getRecent(n: int) -> List[str]: Returns a list of the last n changes in chronological order of their timestamps.python
log = ChangeLog(3)
log.addChange("Alice", "Added a new section", 1)
log.addChange("Bob", "Fixed a typo", 2)
log.addChange("Alice", "Updated the header", 3)
log.getRecent(2)
['Fixed a typo', 'Updated the header']python
log.addChange("Charlie", "Removed a line", 4)
log.getRecent(3)
['Added a new section', 'Fixed a typo', 'Updated the header']1 <= n <= 10001 <= timestamp <= 10^6text which represents a Notion page's content, and an integer k representing the size of the sliding window. Your task is to find the maximum number of unique words present in any contiguous substring of text with length k. You need to return this maximum count.text = "This is a sample Notion page, Notion pages are great!", k = 20 8 "a sample Notion page, Notion pages are" contains 8 unique words.text = "Test Test Test!", k = 10 2 "Test Test" which contains 2 unique words.1 <= k <= text.lengthtext.length <= 10^5Sign up for free to access walkthroughs, AI-generated questions, and more.
Get Started Free