Restaurant Waitlist API Use your API to get a party from a FIFO waitlist. Your API needs to: add a party to the waitlist remove a party from the waitlis…
Online coding judge Registered users Contest has a start time and end time (next Sunday 10 AM to 5 PM PST) Upon start, users get access to 10 problems U…
Design a 1:1 Messaging App Requirements Conversations User sees a list of conversations, with the most recently active conversations first. Scrolling do…
Count Connected Components in a Binary Matrix Given a binary matrix, count the number of connected components formed by the cells with value 1 . Cells a…
Input is a string and a maximum width length. If a word is too long to fit into one line, we change line and move it to the other line. Implement a Pyth…
Implement a FileStorage Library You are tasked with implementing a library for managing file storage in a cloud-based application. The library should al…
You are given a graph with X and Y axes. Each axis represents positive integers. We will plot a graph based on given X and Y points. Starting from (0,0)…
Goal Extract the vehicles with no associated vehicle parts. Requirements Expected column: vehicle_id 这道 SQL 题考查的是如何找出“没有匹配记录”的主表数据,核心思路通常是使用 LEFT JOIN 连…
Before you begin This challenge is about processing real-time data from a webhook hosted by the Massachusetts Bay Transportation Authority (MBTA). For c…
Implement a Merger class that accepts a batch of data from each sensor and merges the batches into a single output stream sorted by timestamp. We have N…
Legiana, a Lyft user, is reviewing his rides from a specific day. However, the application is not retrieving the complete data for the rides, and they a…
Q: Implement sum() so that the following expressions evaluate correctly: sum(1, 2, 3).sumOf(); // 6 sum(2, 3)(2).sumOf(); // 7 sum(1)(2)(3)(4).sumOf();…
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…
Card game N players randomly draw 4 cards per person. Winning rule Same color Same number Sequential 这道题给出多人随机抽取 4 张牌的设定,需要根据手牌判断获胜条件是否满足:同色、同数字、或连续顺子。核…
Problem Description Input: N (1-20) Requirement: Count how many numbers with at most N digits do not contain consecutive digit 6 s. Example: 2, 0~99, in…
Assume you run a movie theater that has many auditoriums, and every day you need to schedule movies into those auditoriums. You want to schedule all mov…
Given a string s containing just the characters ( , ) , { , } , [ and ] , determine if the input string is valid. An input string is valid if: Open brac…
You are given an array of integers and another target integer as input. Your task is to return the index or indices of the target integer in the array a…
Given a string, return the longest recurring substring. 这道题要求在一个字符串中找出最长的重复子串,也就是在原串中至少出现两次的连续子串,并返回长度最长的那个。常见思路是结合后缀数组、后缀树,或者用二分答案配合哈希/滚动哈希来判断某个长度的子串是否…