03 2019 档案
摘要:题目如下: Equations are given in the format A / B = k, whereA and B are variables represented as strings, and k is a real number (floating point number). 
        阅读全文
            
摘要:题目如下: Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balance
        阅读全文
            
摘要:题目如下: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tre
        阅读全文
            
摘要:题目如下: Given a positive integer K, you need find the smallest positive integer N such that N is divisible by K, and N only contains the digit 1. Return
        阅读全文
            
摘要:题目如下: A character is unique in string S if it occurs exactly once in it. For example, in string S = "LETTER", the only unique characters are "L" and "
        阅读全文
            
摘要:题目如下: Given a binary string S (a string consisting only of '0' and '1's) and a positive integer N, return true if and only if for every integer X from
        阅读全文
            
摘要:题目如下: Given an array A of positive integers, A[i]represents the value of the i-th sightseeing spot, and two sightseeing spots i and j have distance j 
        阅读全文
            
摘要:题目如下: Given an array A of integers, return true if and only if we can partition the array into three non-emptyparts with equal sums. Formally, we can 
        阅读全文
            
摘要:题目如下: Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of 
        阅读全文
            
摘要:题目如下: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may 
        阅读全文
            
摘要:题目如下: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may 
        阅读全文
            
摘要:题目如下: Your are given an array of integers prices, for which the i-th element is the price of a given stock on day i; and a non-negative integer feerep
        阅读全文
            
摘要:题目如下: Consider the string s to be the infinite wraparound string of "abcdefghijklmnopqrstuvwxyz", so s will look like this: "...zabcdefghijklmnopqrstu
        阅读全文
            
摘要:题目如下: Given an array of unique integers, each integer is strictly greater than 1. We make a binary tree using these integers and each number may be us
        阅读全文
            
摘要:题目如下: Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You may not modify the values in the list's nodes, only nod
        阅读全文
            
摘要:题目如下: A conveyor belt has packages that must be shipped from one port to another within D days. The i-th package on the conveyor belt has a weight of 
        阅读全文
            
摘要:题目如下: In a list of songs, the i-th song has a duration of time[i] seconds. Return the number of pairs of songs for which their total duration in secon
        阅读全文
            
摘要:题目如下: Every non-negative integer N has a binary representation. For example, 5 can be represented as "101" in binary, 11 as "1011" in binary, and so o
        阅读全文
            
摘要:题目如下: Given a non-empty binary tree, find the maximum path sum. For this problem, a path is defined as any sequence of nodes from some starting node t
        阅读全文
            
摘要:题目如下: Sort a linked list in O(n log n) time using constant space complexity. Example 1: Example 2: 解题思路:因为题目要求时间复杂度是O(nlogn),所以快排应该是合适的方法。原理也和快速排序差不多,
        阅读全文
            
摘要:题目如下: Given a list of directory info including directory path, and all the files with contents in this directory, you need to find out all the groups 
        阅读全文
            
摘要:题目如下: Return the root node of a binary search tree that matches the given preorder traversal. (Recall that a binary search tree is a binary tree where
        阅读全文
            
摘要:题目如下: Given the root of a binary tree, then value v and depth d, you need to add a row of nodes with value v at the given depth d. The root node is at
        阅读全文
            
摘要:题目如下: The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid ou
        阅读全文
            
摘要:题目如下: Given a list of words (without duplicates), please write a program that returns all concatenated words in the given list of words. A concatenate
        阅读全文
            
摘要:题目如下: In a row of dominoes, A[i] and B[i] represent the top and bottom halves of the i-th domino. (A domino is a tile with two numbers from 1 to 6 - o
        阅读全文
            
摘要:题目如下: Normally, the factorial of a positive integer n is the product of all positive integers less than or equal to n. For example, factorial(10) = 10
        阅读全文
            
摘要:题目如下: Given an array A of integers, we must modify the array in the following way: we choose an i and replace A[i]with -A[i], and we repeat this proce
        阅读全文
            
摘要:题目如下: Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make sur
        阅读全文
            
摘要:题目如下: Given a non-empty string containing an out-of-order English representation of digits 0-9, output the digits in ascending order. Note: Example 1:
        阅读全文
            
摘要:题目如下: Given a collection of intervals, find the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping. Note
        阅读全文
            
摘要:题目如下: Given a string that consists of only uppercase English letters, you can replace any letter in the string with another letter at most k times. Fi
        阅读全文
            
摘要:题目如下: You are given the number of rows n_rows and number of columns n_cols of a 2D binary matrix where all values are initially 0. Write a function fl
        阅读全文
            
摘要:题目如下: In an array A containing only 0s and 1s, a K-bit flip consists of choosing a (contiguous) subarray of length K and simultaneously changing every
        阅读全文
            
摘要:题目如下: On a N x N grid of cells, each cell (x, y) with 0 <= x < N and 0 <= y < N has a lamp. Initially, some number of lamps are on. lamps[i] tells us 
        阅读全文
            
摘要:题目如下: Given an array A of strings made only from lowercase letters, return a list of all characters that show up in all strings within the list (inclu
        阅读全文
            
摘要:题目如下: We are given that the string "abc" is valid. From any valid string V, we may split V into two pieces X and Y such that X + Y (X concatenated wit
        阅读全文
            
摘要:题目如下: Given an array A of 0s and 1s, we may change up to K values from 0 to 1. Return the length of the longest (contiguous) subarray that contains on
        阅读全文
            
摘要:题目如下: There are a total of n courses you have to take, labeled from 0 to n-1. Some courses may have prerequisites, for example to take course 0 you ha
        阅读全文
            
 
                     
                    
                 
                    
                 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号