Systems Diagram Do not spend time trying to make this pretty. It is just a tool to understand your thought process and have a shared understanding of th…
Background This is a small codebase related to mazes. It has some basic utilities to parse a maze from a string representation, print out a maze, and at…
How many users started a call with more than 3 different people in the last 7 days? Table name: video_calls This table has 1 row per unique call. Assume…
Given a string S consisting of lowercase English characters, determine if you can make it a palindrome by removing at most 1 character. Examples: tacoca…
Given an array of integers (0 to 9), rearrange the positions of the array elements to represent the second largest possible number. Example 1: Input: [1…
Implement a mock of the Unix cd (change directory) command. The code does not have to change actual directories; it only needs to return the new path af…
Design a system that supports the following operations: A user can create a new post and attach one or more hashtags to it. A user can search for posts…
Given an array of integers and an integer k , for each element x in the array one can construct a slice of the array that includes x and k – 1 elements…
Every unique item in the input appears exactly 3 times. Examples: [1, 1, 1] => true [1, 2, 3] => false Consider a cache-like data structure with operati…
Question Statement Write a function that returns true if a given string is a palindrome (a palindrome is a string that is the same when reversed, if you…
Given an array of integers, find any one local minimum in the array. A local minimum is defined as an integer in the array that is less than or equal to…
Interval Insertion You are given a set of non-overlapping intervals sorted by their start times, and another interval to insert. Insert the new interval…
Implement the backend side of a user management page. Given two user lists, one is the current database and the other is a list of possible changes. The…
Description You are given an array of integers that represent the height of apartment buildings. The leftmost building is at index 0 , and the array lis…
Given a list of strings, find the groups of strings that can be rotated to each other (so each character is changed by the same distance). Input: [‘abc’…
Given an array of integers that is an arithmetic progression missing one integer, return the missing integer. Example: [1, 2, 4, 5] -> 3 这道题的核心是等差数列缺项定位…
Question: You are walking on a 2D map contoured with various heights of land that accumulates water when it rains. Specifically, when the rainwater heig…
Top K Frequent Elements Description: Given a non-empty array of integers, return up to k most frequent elements. For example: Given [1,2,1,1,2,3] and k…