上一页 1 2 3 4 5 6 7 ··· 44 下一页
摘要: Design the CombinationIterator class: CombinationIterator(string characters, int combinationLength) Initializes the object with a string characters of 阅读全文
posted @ 2022-03-07 13:54 Grandyang 阅读(350) 评论(0) 推荐(0) 编辑
摘要: Given a m x n binary matrix mat. In one step, you can choose one cell and flip it and all the four neighbors of it if they exist (Flip is changing 1 t 阅读全文
posted @ 2022-02-28 23:52 Grandyang 阅读(456) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers nums and an integer threshold, we will choose a positive integer divisor, divide all the array by it, and sum the division' 阅读全文
posted @ 2022-01-17 20:34 Grandyang 阅读(377) 评论(0) 推荐(0) 编辑
摘要: There are n people that are split into some unknown number of groups. Each person is labeled with a unique ID from 0 to n - 1. You are given an intege 阅读全文
posted @ 2022-01-14 19:58 Grandyang 阅读(380) 评论(0) 推荐(0) 编辑
摘要: Given an integer number n, return the difference between the product of its digits and the sum of its digits. Example 1: Input: n = 234 Output: 15 Exp 阅读全文
posted @ 2022-01-07 19:06 Grandyang 阅读(293) 评论(0) 推荐(0) 编辑
摘要: You are given a string s containing lowercase letters and an integer k. You need to : First, change some characters of s to other lowercase English le 阅读全文
posted @ 2022-01-03 11:18 Grandyang 阅读(423) 评论(0) 推荐(0) 编辑
摘要: Given a m * n matrix of ones and zeros, return how many square submatrices have all ones. Example 1: Input: matrix = [ [0,1,1,1], [1,1,1,1], [0,1,1,1] 阅读全文
posted @ 2021-12-26 14:03 Grandyang 阅读(684) 评论(0) 推荐(0) 编辑
摘要: Given two integers tomatoSlices and cheeseSlices. The ingredients of different burgers are as follows: Jumbo Burger: 4 tomato slices and 1 cheese slic 阅读全文
posted @ 2021-12-23 12:58 Grandyang 阅读(260) 评论(0) 推荐(0) 编辑
摘要: Tic-tac-toe is played by two players A and B on a 3 x 3 grid. The rules of Tic-Tac-Toe are: Players take turns placing characters into empty squares ' 阅读全文
posted @ 2021-12-19 13:09 Grandyang 阅读(710) 评论(0) 推荐(0) 编辑
摘要: You have a pointer at index 0 in an array of size arrLen. At each step, you can move 1 position to the left, 1 position to the right in the array, or 阅读全文
posted @ 2021-12-17 16:35 Grandyang 阅读(414) 评论(0) 推荐(0) 编辑
摘要: Given an array of strings products and a string searchWord. We want to design a system that suggests at most three product names from products after e 阅读全文
posted @ 2021-12-12 16:44 Grandyang 阅读(901) 评论(0) 推荐(0) 编辑
摘要: On a 2D plane, there are n points with integer coordinates points[i] = [xi, yi]. Return *the minimum time in seconds to visit all the points in the or 阅读全文
posted @ 2021-12-08 10:29 Grandyang 阅读(446) 评论(0) 推荐(0) 编辑
摘要: A storekeeper is a game in which the player pushes boxes around in a warehouse trying to get them to target locations. The game is represented by an m 阅读全文
posted @ 2021-12-05 15:39 Grandyang 阅读(672) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of integers, we need to find the maximum possible sum of elements of the array such that it is divisible by three. Example 1: Inpu 阅读全文
posted @ 2021-12-01 14:42 Grandyang 阅读(753) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree with the following rules: root.val == 0 If treeNode.val == x and treeNode.left != null, then treeNode.left.val == 2 * x + 1 If tre 阅读全文
posted @ 2021-11-27 14:07 Grandyang 阅读(347) 评论(0) 推荐(0) 编辑
摘要: Given a 2D grid of size m x n and an integer k. You need to shift the grid k times. In one shift operation: Element at grid[i][j] moves to grid[i][j + 阅读全文
posted @ 2021-11-23 23:58 Grandyang 阅读(1931) 评论(0) 推荐(0) 编辑
摘要: Given a list of words, list of single letters (might be repeating) and score of every character. Return the maximum score of any valid set of words fo 阅读全文
posted @ 2021-11-22 02:05 Grandyang 阅读(894) 评论(0) 推荐(0) 编辑
摘要: Given a 2D grid consists of 0s (land) and 1s (water). An island is a maximal 4-directionally connected group of 0s and a closed island is an island to 阅读全文
posted @ 2021-11-19 11:04 Grandyang 阅读(1073) 评论(0) 推荐(0) 编辑
摘要: Given the following details of a matrix with n columns and 2 rows : The matrix is a binary matrix, which means each element in the matrix can be 0 or  阅读全文
posted @ 2021-11-14 05:38 Grandyang 阅读(436) 评论(0) 推荐(0) 编辑
摘要: There is an m x n matrix that is initialized to all 0's. There is also a 2D array indices where each indices[i] = [ri, ci] represents a 0-indexed loca 阅读全文
posted @ 2021-11-10 11:55 Grandyang 阅读(545) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of positive integers. Your task is to select some subset of nums, multiply each element by an integer and add all these numbers. T 阅读全文
posted @ 2021-11-08 12:33 Grandyang 阅读(451) 评论(0) 推荐(0) 编辑
摘要: Given a string s of '(' , ')' and lowercase English characters. Your task is to remove the minimum number of parentheses ( '(' or ')', in any position 阅读全文
posted @ 2021-11-06 09:29 Grandyang 阅读(1693) 评论(1) 推荐(0) 编辑
摘要: Given an array of integers nums and an integer k. A continuous subarray is called nice if there are k odd numbers on it. Return the number of nice sub 阅读全文
posted @ 2021-10-31 09:42 Grandyang 阅读(786) 评论(0) 推荐(0) 编辑
摘要: You are given two strings s1 and s2 of equal length consisting of letters "x" and "y" only. Your task is to make these two strings equal to each other 阅读全文
posted @ 2021-10-23 13:04 Grandyang 阅读(563) 评论(0) 推荐(0) 编辑
摘要: If you got the following error when run the sam deploy : CREATE_FAILED AWS::Lambda::Function <YourFunctionName> Resource handler Function returned mes 阅读全文
posted @ 2021-10-21 13:06 Grandyang 阅读(1270) 评论(0) 推荐(0) 编辑
摘要: Given a rectangle of size n x m, return the minimum number of integer-sided squares that tile the rectangle. Example 1: Input: n = 2, m = 3 Output: 3 阅读全文
posted @ 2021-10-20 13:31 Grandyang 阅读(965) 评论(0) 推荐(0) 编辑
摘要: You are given an array of strings arr. A string s is formed by the concatenation of a subsequence of arr that has unique characters. Return the maximu 阅读全文
posted @ 2021-10-17 11:36 Grandyang 阅读(844) 评论(0) 推荐(0) 编辑
摘要: If you got the following warning: The elevation provided <Paper elevation={24}> is not available in the theme. Please make sure that `theme.shadows[24 阅读全文
posted @ 2021-10-14 22:51 Grandyang 阅读(421) 评论(0) 推荐(0) 编辑
摘要: Given 2 integers n and start. Your task is return any permutation p of (0,1,2.....,2^n -1) such that : p[0] = start p[i] and p[i+1] differ by only one 阅读全文
posted @ 2021-10-14 10:18 Grandyang 阅读(318) 评论(0) 推荐(0) 编辑
摘要: Given a callable function f(x, y) with a hidden formula and a value z, reverse engineer the formula and return *all positive integer pairs x and y whe 阅读全文
posted @ 2021-10-12 12:28 Grandyang 阅读(368) 评论(0) 推荐(0) 编辑
摘要: 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 startTime,  阅读全文
posted @ 2021-10-11 02:04 Grandyang 阅读(1736) 评论(0) 推荐(0) 编辑
摘要: You are given a string containing only 4 kinds of characters 'Q', 'W', 'E' and 'R'. A string is said to be balancedif each of its characters appears n 阅读全文
posted @ 2021-10-07 23:28 Grandyang 阅读(462) 评论(1) 推荐(0) 编辑
摘要: If the CodeBuild failed with following issue: Err:4 https://deb.nodesource.com/node_14.x focal Release Certificate verification failed: The certificat 阅读全文
posted @ 2021-10-07 12:55 Grandyang 阅读(782) 评论(0) 推荐(0) 编辑
摘要: Given a list of folders folder, return the folders after removing all sub-folders in those folders. You may return the answer in any order. If a folde 阅读全文
posted @ 2021-10-06 11:46 Grandyang 阅读(354) 评论(0) 推荐(0) 编辑
摘要: When you run: hexo clean && hexo g You might get the following error: err: [Error: ENFILE: file table overflow, open '/<YourFilePath>/<YourFile>'] { e 阅读全文
posted @ 2021-10-04 07:56 Grandyang 阅读(613) 评论(0) 推荐(0) 编辑
摘要: 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 straight 阅读全文
posted @ 2021-10-03 07:23 Grandyang 阅读(567) 评论(0) 推荐(0) 编辑
摘要: 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 of pa 阅读全文
posted @ 2021-10-01 11:56 Grandyang 阅读(958) 评论(0) 推荐(0) 编辑
摘要: 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 exactly on 阅读全文
posted @ 2021-09-27 08:58 Grandyang 阅读(534) 评论(0) 推荐(0) 编辑
摘要: A die simulator generates a random number from 1 to 6 for each roll. You introduced a constraint to the generator such that it cannot roll the number  阅读全文
posted @ 2021-09-23 12:21 Grandyang 阅读(804) 评论(0) 推荐(0) 编辑
摘要: When you try to debug C++ in Visual Studio Code on Mac, you might have the following error: Errors exist after running preLaunchTask 'C/C++: clang++ b 阅读全文
posted @ 2021-09-20 11:03 Grandyang 阅读(638) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 44 下一页
Fork me on GitHub