摘要:
For a string sequence, a string word is k-repeating if word concatenated k times is a substring of sequence. The word's maximum k-repeating value is t 阅读全文
摘要:
You are given an m x n integer matrix grid where each cell is either 0 (empty) or 1 (obstacle). You can move up, down, left, or right from and to an e 阅读全文
摘要:
Given an integer array nums, partition it into two (contiguous) subarrays left and right so that: Every element in left is less than or equal to every 阅读全文
摘要:
You are given two strings word1 and word2. Merge the strings by adding letters in alternating order, starting with word1. If a string is longer than t 阅读全文
摘要:
The school cafeteria offers circular and square sandwiches at lunch break, referred to by numbers 0 and 1 respectively. All students stand in a queue. 阅读全文
摘要:
You are given the head of a linked list containing unique integer values and an integer array nums that is a subset of the linked list values. Return 阅读全文
摘要:
You are given the head of a linked list. Delete the middle node, and return the head of the modified linked list. The middle node of a linked list of 阅读全文
摘要:
Given a palindromic string of lowercase English letters palindrome, replace exactly one character with any lowercase English letter so that the result 阅读全文
摘要:
Given an m x n picture consisting of black 'B' and white 'W' pixels, return the number of black lonely pixels. A black lonely pixel is a character 'B' 阅读全文
摘要:
Given an integer array of even length arr, return true if it is possible to reorder arr such that arr[2 * i + 1] = 2 * arr[2 * i] for every 0 <= i < l 阅读全文
摘要:
An integer array original is transformed into a doubled array changed by appending twice the value of every element in original, and then randomly shu 阅读全文
摘要:
You are given an array nums of non-negative integers. nums is considered special if there exists a number x such that there are exactly x numbers in n 阅读全文
摘要:
Given the array nums consisting of 2n elements in the form [x1,x2,...,xn,y1,y2,...,yn]. Return the array in the form [x1,y1,x2,y2,...,xn,yn]. Example 阅读全文
摘要:
You are given a directed graph with n nodes labeled from 0 to n - 1, where each node has exactly one outgoing edge. The graph is represented by a give 阅读全文
摘要:
You are given an n x n integer matrix grid. Generate an integer matrix maxLocal of size (n - 2) x (n - 2) such that: maxLocal[i][j] is equal to the la 阅读全文
摘要:
Given an m x n board of characters and a list of strings words, return all words on the board. Each word must be constructed from letters of sequentia 阅读全文
摘要:
On a single-threaded CPU, we execute a program containing n functions. Each function has a unique ID between 0 and n-1. Function calls are stored in a 阅读全文
摘要:
You are given a stream of records about a particular stock. Each record contains a timestamp and the corresponding price of the stock at that timestam 阅读全文
摘要:
There are n cars going to the same destination along a one-lane road. The destination is target miles away. You are given two integer array position a 阅读全文
摘要:
Given the root of a binary tree, the level of its root is 1, the level of its children is 2, and so on. Return the smallest level x such that the sum 阅读全文