Meta software engineer interviews cover algorithms, data structures, system design, and coding problems drawn from real interview rounds.
Question Your task is to implement a simple in-memory cloud storage system that maps objects (files) to their metadata (name, size, etc.). You...
Input: Graph (nodes and edges)Question Design a banking system that supports account management, transactions, and various financial operations.
Input: Graph (nodes and edges)Question Given a list of strings, find the minimum subset of prefixes that can represent the entire input set. A string is "represented" if it...
Input: Array of stringsDescription Implement a simplified in-memory database that supports record manipulation with various operations. The system should handle basic...
Input: Graph (nodes and edges)Question You are monitoring the building density in a district of houses. The district is represented as a number line, where each house is located...
Input: Array of integers+ and -, and parentheses ( and ), simplify...Input: Stringserialize and deserialize that convert a binary tree into a single string representation and back again. The representation must be unique and should correctly reconstruct the original tree structure. You can use any traversal method. def serialize(root: Optional[TreeNode]) -> str: def deserialize(data: str) -> Optional[TreeNode]: root = [1,2,3,null,null,4,5] "1,2,3,null,null,4,5" root = [1] "1,null" 0 and 10^4 nodes. [-1000, 1000]. start to node end.Example 1:edges = [[0, 1], [1, 2], [2, 3]], start = 0, end = 3[0, 1, 2, 3]0 to node 3 is 0 -> 1 -> 2 -> 3.Example 2:edges = [[0, 1], [1, 2], [0, 2], [2, 3]], start = 0, end = 3[0, 2, 3]Constraints:1 <= edges.length <= 10^4s, find the length of the longest substring containing at most two distinct characters.Example 1:s = "eceba"33.Example 2:s = "ccaabbb"55.Constraints:1 <= s.length <= 10^5s consists of English letters, digits, symbols, and spaces.LRUCache(int capacity): Initializes the cache with a positive size capacity.int get(int key): Returns the value of the key if the key exists, otherwise returns -1.void put(int key, int value): Update the value of the key if present, or add the key-value pair if not existing. When the cache reaches its capacity, it should invalidate the least recently used item before inserting a new item.LRUCache(2); cache.put(1, 1); cache.put(2, 2); cache.get(1); cache.put(3, 3); cache.get(2); cache.put(4, 4); cache.get(1); cache.get(3); cache.get(4);1; -1; 3; 4Constraints:capacity is always positive and will not exceed 1000get and put will always be called with valid keys.Sign up for free to access walkthroughs, AI-generated questions, and more.
Get Started Free