Max Altitude of Islands Given an m x n 2D grid which represents a map where positive integers represent elevation of land and 0 ‘s represent water, retu…
SQL to Get Top 10 Selling Categories by Total Sales in 2024 category ( category_id INTEGER PRIMARY KEY, category_name VARCHAR(100) NOT NULL ) table ( pr…
This set of SQL interview questions uses a bookstore database with the following tables: books , authors , transactions , and customers . books book_id…
The self-service point-of-sale system you are implementing is a customer-facing touch-screen kiosk, positioned in a fast-food restaurant for customers t…
Meta VO Interview Question: Carpooling Value Proposition, Metrics, and Data Model Design A ride-share service allows customers to use an app to request…
Given an integer array nums , find a peak element, and return its index. A peak element is an element that is strictly greater than its neighbors. You m…
Map Equivalence Geographical maps representing land and water forms can be stored in the form of a grid where 1 represents land and 0 represents water….
Credits Implement the Credits class, which should support the following operations: granting credits, subtracting credits, and getting the balance for a…
Implement 2 functions: A’ = encode(A) takes in a string (ASCII only) that represents the document A , and returns the binary string representation of th…
An Amazon pickup location has a set number of lockers in which boxes are dropped off and picked up. Boxes can come in many different sizes. Lockers come…
There are three companies: IBM, Intel, and Apple. A total of 8 people worked in these three companies. Each person can be either a manager or a direct r…
You are developing an online game where 2 users can play against each other. We want to create a service which will match users with similar ranks so th…
You are given a series of packages arranged on a conveyor belt. Each package has a specific weight, represented by the array weights , where the i th el…
Edit distance between 2 strings with dictionary-based cost 这道题本质上是经典编辑距离的变体:给定两个字符串,需要通过插入、删除、替换等操作把一个字符串变成另一个字符串,但每种操作的代价不是固定值,而是由字典规则决定。解题时通常用动态规划来维护前…
Given two integer arrays nums1 and nums2 , find their intersection. Example 1: nums1: [1, 2, 3, 4] nums2: [1, 2] result: [1, 2] 这道题要求找出两个整数数组的交集,核心思路通常是…
We are writing software to collect and manage data on how fast racers can complete obstacle courses. An obstacle course is a series of difficult physica…
You have to paint all the houses such that no two adjacent houses have the same color. The cost of painting each house with a certain color is represent…
Create a REST API that exposes the following endpoint: GET /api/bootstrap Request Input User Id Response Address Data: address including the user’s name…
Given a binary tree, create two functions: one that serializes the binary tree into a string and one that deserializes a serialized string back into a b…