10 2019 档案
摘要:题目如下: Given an array of strings arr. String s is a concatenation of a sub-sequence of arr which have unique characters. Return the maximum possible le
        阅读全文
            
摘要:题目如下: Given a function f(x, y) and a value z, return all positive integer pairs x and y where f(x,y) == z. The function is constantly increasing, i.e.
        阅读全文
            
摘要:题目如下: 有一个同学在学习分式。他需要将一个连分数化成最简分数,你能帮助他吗? 连分数是形如上图的分式。在本题中,所有系数都是大于等于0的整数。 输入的cont代表连分数的系数(cont[0]代表上图的a0,以此类推)。返回一个长度为2的数组[n, m],使得连分数的值等于n / m,且n, m最
        阅读全文
            
摘要:题目如下: We have two integer sequences A and B of the same non-zero length. We are allowed to swap elements A[i] and B[i]. Note that both elements are in
        阅读全文
            
摘要:题目如下: We have n jobs, where every job is scheduled to be done from startTime[i] to endTime[i], obtaining a profit of profit[i]. You're given the start
        阅读全文
            
摘要:题目如下: You are given a string containing only 4 kinds of characters 'Q', 'W', 'E' and 'R'. A string is said to be balanced if each of its characters ap
        阅读全文
            
摘要:题目如下: Given a list of folders, remove all sub-folders in those folders and return in any order the folders after removing. If a folder[i] is located w
        阅读全文
            
摘要:题目如下: You are given an array coordinates, coordinates[i] = [x, y], where [x, y] represents the coordinate of a point. Check if these points make a str
        阅读全文
            
摘要:题目如下: You have some coins. The i-th coin has a probability prob[i] of facing heads when tossed. Return the probability that the number of coins facing
        阅读全文
            
摘要:题目如下: 你是一名行政助理,手里有两位客户的空闲时间表:slots1 和 slots2,以及会议的预计持续时间 duration,请你为他们安排合适的会议时间。 「会议时间」是两位客户都有空参加,并且持续时间能够满足预计时间 duration 的 最早的时间间隔。 如果没有满足要求的会议时间,就请
        阅读全文
            
摘要:题目如下: 解题思路:题目很简单。先对数组排序,根据最大值和最小值即可求出公差,然后遍历数组,计算相邻元素的差,如果差不等于公差,即表示数字缺失。 代码如下:
        阅读全文
            
摘要:题目如下: n passengers board an airplane with exactly n seats. The first passenger has lost the ticket and picks a seat randomly. But after that, the rest
        阅读全文
            
摘要:题目如下: Given an array nums of positive integers, return the longest possible length of an array prefix of nums, such that it is possible to remove exac
        阅读全文
            
摘要:题目如下: On an 8x8 chessboard, there can be multiple Black Queens and one White King. Given an array of integer coordinates queens that represents the po
        阅读全文
            
摘要:题目如下: Balanced strings are those who have equal quantity of 'L' and 'R' characters. Given a balanced string s split it in the maximum amount of balanc
        阅读全文
            
摘要:题目如下: In a gold mine grid of size m * n, each cell in this mine has an integer representing the amount of gold in that cell, 0 if it is empty. Return 
        阅读全文
            
摘要:题目如下: Given an integer n, your task is to count how many strings of length n can be formed under the following rules: Each character is a lower case v
        阅读全文
            
摘要:题目如下: Given an integer array arr and an integer difference, return the length of the longest subsequence in arr which is an arithmetic sequence such t
        阅读全文
            
摘要:题目如下: There are some chips, and the i-th chip is at position chips[i]. You can perform any of the two following types of moves any number of times (po
        阅读全文
            
摘要:题目如下: A Stepping Number is an integer such that all of its adjacent digits have an absolute difference of exactly 1. For example, 321 is a Stepping Nu
        阅读全文
            
摘要:题目如下: Given two binary search trees, return True if and only if there is a node in the first tree and a node in the second tree whose values sum up to
        阅读全文
            
摘要:题目如下: Given three integer arrays arr1, arr2 and arr3 sorted in strictly increasing order, return a sorted array of only the integers that appeared in 
        阅读全文
            
摘要:题目如下: In an n*n grid, there is a snake that spans 2 cells and starts moving from the top left corner at (0, 0)and (0, 1). The grid has empty cells rep
        阅读全文
            
摘要:题目如下: Given a string s, a k duplicate removal consists of choosing k adjacent and equal letters from s and removing them causing the left and the righ
        阅读全文
            
摘要:题目如下: You are given two strings s and t of the same length. You want to change s to t. Changing the i-th character of s to i-th character of t costs |
        阅读全文
            
摘要:题目如下: Given an array of integers arr, write a function that returns true if and only if the number of occurrences of each value in the array is unique
        阅读全文
            
摘要:题目如下: In a given array nums of positive integers, find three non-overlapping subarrays with maximum sum. Each subarray will be of size k, and we want 
        阅读全文
            
 
                     
                    
                 
                    
                 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号