319 challenges in the catalogue. Browse freely; sign in to open the editor and submit.
Write a SQL query to find all customers who never order anything. Return the result table with the column name Customers. Input: Customers table: | id | name | |----|-------| | 1 | Joe | | 2 | Henry | | 3 | Sam | | 4 | Max | Orders table:…
Sign in to solveCross-Site Request Forgery (CSRF) is an attack that forces an authenticated user to execute unwanted actions on a web application in which they're currently authenticated. Your task is to implement an Express.js middleware function…
Sign in to solveYou are an SRE tasked with setting up a comprehensive monitoring and alerting pipeline for a microservice using Prometheus, Grafana, and Alertmanager. Given a service configuration with SLO targets, generate a complete monitoring stack…
Sign in to solveYou are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]). Find two lines that together with the x-axis form a container, such that the…
Sign in to solveA message containing letters from A-Z can be encoded into numbers using the following mapping: To decode an encoded message, all the digits must be grouped then mapped back into letters using the reverse of the mapping above (there may be…
Sign in to solveYou have a graph of n nodes. You are given an integer n and an array edges where edges[i] = [ai, bi] indicates that there is an edge between ai and bi in the graph. Return the number of connected components in the graph. Input: n = 5,…
Sign in to solveGiven a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated sequence of one or more dictionary words. Note that the same word in the dictionary may be reused multiple times in the…
Sign in to solveGiven the root of a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. Example 1: Example 2: Example 3: The number of nodes in the tree is in the range [0,…
Sign in to solveGiven two strings s and p, return an array of all the start indices of p's anagrams in s. You may return the answer in any order. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically…
Sign in to solveYou are given an array of people, people, which are the attributes of some people in a queue (not necessarily in order). Each people[i] = [hi, ki] represents the i-th person of height hi with exactly ki other people in front who have a…
Sign in to solveGiven a string s, rearrange the characters of s so that any two adjacent characters are not the same. Return any possible rearrangement of s or return "" if not possible. Example 1: Example 2: 1 <= s.length <= 500 s consists of lowercase…
Sign in to solveGiven an integer array nums that may contain duplicates, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order. Example 1: Example 2: 1 <= nums.length <= 10 -10…
Sign in to solve