This section has 6 questions. For each question, read the code and type your answer under the Answer heading. You should answer the questions without ru…
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…
You are given a string consisting of the letters x and y , such as xyxxxyxyy . In addition, you have an operation called flip , which changes a single x…
Given a file system: root (id=1) dir (id=2) file1 (id=4): 100b file2 (id=5): 200b file3 (id=3): 300b It will be represented as follows: Filesystem = { 1…
Write a function that, given an x, y coordinate of a land cell, returns all water cells that touch that island. 这题的核心是先从给定的陆地坐标出发,遍历整座岛屿,再收集与岛屿边界相邻的所有水格…
There is a plot (grid-like land) with each spot having a specified elevation. Within this plot there are two villages that need water delivered to them….
Given this list, design a class to help us efficiently answer the following questions: Given a policy, find out the number of unique pins that violate t…
There are people in a line filming a TikTok. You are given an integer array heights of size n that represents the heights of the people in the line. The…
Maximum Subarray Given an integer array nums , find the subarray with the largest sum, and return its sum. Input: nums = [-2,1,-3,4,-1,2,1,-5,4] Output:…
You are given a 0-indexed integer array coins , representing the values of the coins available, and an integer target . An integer x is obtainable if th…
Implement Promise.all Promise.all() takes an iterable of Promise objects and returns a single Promise. The returned Promise resolves to an array of resu…
Version Sort Versions is a version number list for a project. Because many people maintain it, the format is irregular. Given an array of version string…
Amazon sells millions of products on its website, and for better customer experience, it wants to show a widget with the most popular items bought on th…
Given N free bytes in the memory, implement the following two functions. malloc(k) : allocates a block of k bytes of memory and returns a pointer to the…
You are given a 0-indexed integer array nums of even length consisting of an equal number of positive and negative integers. You should return the array…
Problem: Numbers, arrange them such that negative numbers are to the left of 0 and positive numbers are to the right of 0. The goal is to rearrange the…
Title Evaluate Division Question description You are given an array of variable pairs equations and an array of real numbers values, where equations[i]…