Google backend engineer interviews typically focus on APIs, databases, system design, concurrency, caching, and data structures.
runTests() that accepts a subset of these test cases and returns whether...Input: ListA of integers. A triplet is a sequence of three consecutive elements. A triplet is called zero-sum if the...Input: Arraytext and a dictionary array where each element is in the format "<key>:<id>". Here key is a token string and id...Input: ArrayStreamBuffer class that buffers a stream of integer latency samples in FIFO order and supports O(1) access to both the minimum and maximum...Input: Integer(s)PathRouter class that maps URL-like path patterns to handler names. Patterns may contain wildcard segments (*) that match any...Input: Number(s)+ and -, and parentheses ( and ), simplify...Input: Stringm x n binary grid where each cell is either '1' (land) or '0' (water). A group of connected land cells (connected horizontally...Input: 2D gridnums, return the length of the longest increasing subsequence. You need to implement a function that computes this efficiently.def longest_increasing_subsequence(nums: List[int]) -> int: — returns an integer representing the length of the longest increasing subsequence.[10, 9, 2, 5, 3, 7, 101, 18]4[2, 3, 7, 101], so the length is 4.1 <= len(nums) <= 2500-10^4 <= nums[i] <= 10^4.graph: Dict[str, List[Tuple[str, int]]].def dijkstra(graph: Dict[str, List[Tuple[str, int]]], start: str) -> Dict[str, int]: — returns a dictionary with the shortest distance from the start node to all other nodes.{ 'A': [('B', 1), ('C', 4)], 'B': [('A', 1), ('C', 2), ('D', 5)], 'C': [('A', 4), ('B', 2), ('D', 1)], 'D': [('B', 5), ('C', 1)] }, 'A'{'A': 0, 'B': 1, 'C': 3, 'D': 4}A, the shortest path to B is 1, to C is 3, and to D is 4.1 <= len(graph) <= 10^41 <= number of edges <= 10^4Sign up for free to access walkthroughs, AI-generated questions, and more.
Get Started Free