摘要:
You are given an integer array pref of size n. Find and return the array arr of size n that satisfies: pref[i] = arr[0] ^ arr[1] ^ ... ^ arr[i]. Note 阅读全文
摘要:
You are given a 0-indexed string s and a dictionary of words dictionary. You have to break s into one or more non-overlapping substrings such that eac 阅读全文
摘要:
You are playing a video game where you are defending your city from a group of n monsters. You are given a 0-indexed integer array dist of size n, whe 阅读全文
摘要:
Given an integer n and an integer array rounds. We have a circular track which consists of n sectors labeled from 1 to n. A marathon will be held on t 阅读全文
摘要:
You are given a 0-indexed integer array forts of length n representing the positions of several forts. forts[i] can be -1, 0, or 1 where: -1 represent 阅读全文
摘要:
You are given an integer total indicating the amount of money you have. You are also given two integers cost1 and cost2 indicating the price of a pen 阅读全文
摘要:
You are given the customer visit log of a shop represented by a 0-indexed string customers consisting only of characters 'N' and 'Y': if the ith chara 阅读全文
摘要:
You are given a map of a server center, represented as a m * n integer matrix grid, where 1 means that on that cell there is a server and 0 means that 阅读全文
摘要:
You are given two strings start and target, both of length n. Each string consists only of the characters 'L', 'R', and '_' where: The characters 'L' 阅读全文
摘要:
There are n friends that are playing a game. The friends are sitting in a circle and are numbered from 1 to n in clockwise order. More formally, movin 阅读全文
摘要:
You are given a 0-indexed integer array nums. You have to partition the array into one or more contiguous subarrays. We call a partition of the array 阅读全文
摘要:
You are given an m x n integer array grid where grid[i][j] could be: 1 representing the starting square. There is exactly one starting square. 2 repre 阅读全文
摘要:
Given two strings s1 and s2, return the lowest ASCII sum of deleted characters to make two strings equal. Example 1: Input: s1 = "sea", s2 = "eat" Out 阅读全文
摘要:
You are given an integer array nums. Two players are playing a game with this array: player 1 and player 2. Player 1 and player 2 take turns, with pla 阅读全文
摘要:
You are given a floating-point number hour, representing the amount of time you have to reach the office. To commute to the office, you must take n tr 阅读全文
摘要:
You are given a stream of points on the X-Y plane. Design an algorithm that: Adds new points from the stream into a data structure. Duplicate points a 阅读全文
摘要:
You are given an array nums of positive integers. In one operation, you can choose any number from nums and reduce it to exactly half the number. (Not 阅读全文
摘要:
Given an integer n, return a list of all possible full binary trees with n nodes. Each node of each tree in the answer must have Node.val == 0. Each e 阅读全文
摘要:
You are given a 0-indexed integer array nums of length n. You are initially standing at index 0. You can jump from index i to index j where i < j if: 阅读全文
摘要:
You are given n tables represented with two arrays names and columns, where names[i] is the name of the ith table and columns[i] is the number of colu 阅读全文