04 2019 档案
摘要:题目如下: Given an array of integers nums, sort the array in ascending order. Example 1: Example 2: Note: 解题思路:题目没说不能用系统函数。 代码如下:
        阅读全文
            
摘要:题目如下: We run a preorder depth first search on the root of a binary tree. At each node in this traversal, we output D dashes (where D is the depth of t
        阅读全文
            
摘要:题目如下: Given an array A of integers, return the length of the longest arithmetic subsequence in A. Recall that a subsequence of A is a list A[i_1], A[i
        阅读全文
            
摘要:题目如下: Given the root of a binary tree, find the maximum value V for which there exists different nodes A and B where V = |A.val - B.val| and A is an a
        阅读全文
            
摘要:题目如下: There are 2N people a company is planning to interview. The cost of flying the i-th person to city A is costs[i][0], and the cost of flying the 
        阅读全文
            
摘要:题目如下: We are given a matrix with R rows and C columns has cells with integer coordinates (r, c), where 0 <= r < R and 0 <= c < C. Additionally, we are
        阅读全文
            
摘要:题目如下: Given an array A of non-negative integers, return the maximum sum of elements in two non-overlapping (contiguous) subarrays, which have lengths 
        阅读全文
            
摘要:题目如下: Implement the StreamChecker class as follows: StreamChecker(words): Constructor, init the data structure with the given words. query(letter): re
        阅读全文
            
摘要:题目如下: Alice and Bob take turns playing a game, with Alice starting first. Initially, there is a number N on the chalkboard. On each player's turn, tha
        阅读全文
            
摘要:题目如下: On an infinite number line (x-axis), we drop given squares in the order they are given. The i-th square dropped (positions[i] = (left, side_leng
        阅读全文
            
摘要:题目如下: Create a timebased key-value store class TimeMap, that supports two operations. 1. set(string key, string value, int timestamp) Stores the key a
        阅读全文
            
摘要:题目如下: Given a C++ program, remove comments from it. The program source is an array where source[i] is the i-th line of the source code. This represent
        阅读全文
            
摘要:题目如下: You are given a series of video clips from a sporting event that lasted Tseconds. These video clips can be overlapping with each other and have 
        阅读全文
            
摘要:题目如下: A query word matches a given pattern if we can insert lowercaseletters to the pattern word so that it equals the query. (We may insert each char
        阅读全文
            
摘要:题目如下: Given a binary tree, each node has value 0 or 1. Each root-to-leaf path represents a binary number starting with the most significant bit. For e
        阅读全文
            
摘要:题目如下: A valid parentheses string is either empty (""), "(" + A + ")", or A + B, where A and B are valid parentheses strings, and + represents string c
        阅读全文
            
摘要:题目如下: Given a 2D array A, each cell is 0 (representing sea) or 1 (representing land) A move consists of walking from one land square 4-directionally t
        阅读全文
            
摘要:题目如下: We are given a linked list with head as the first node. Let's number the nodes in the list: node_1, node_2, node_3, ... etc. Each node may have 
        阅读全文
            
摘要:题目如下: Given a number N, return a string consisting of "0"s and "1"s that represents its value in base -2 (negative two). The returned string must have
        阅读全文
            
摘要:题目如下: Given an array A of 0s and 1s, consider N_i: the i-th subarray from A[0] to A[i] interpreted as a binary number (from most-significant-bit to le
        阅读全文
            
摘要:题目如下: One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we record the node's value. If it is a null
        阅读全文
            
 
                     
                    
                 
                    
                 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号