随笔分类 -  LeetCode

上一页 1 2 3 4 5 6 7 8 ··· 61 下一页
摘要:Given an array nums of integers, return how many of them contain an even number of digits. Example 1: Input: nums = [12,345,2,6,7896] Output: 2 Explan 阅读全文
posted @ 2022-04-24 01:22 Grandyang 阅读(230) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2022-04-19 12:40 Grandyang 阅读(775) 评论(0) 推荐(0) 编辑
摘要:Given a m x n matrix mat and an integer threshold, return the maximum side-length of a square with a sum less than or equal to threshold or return 0 i 阅读全文
posted @ 2022-04-15 09:51 Grandyang 阅读(1092) 评论(0) 推荐(0) 编辑
摘要:An integer has sequential digits if and only if each digit in the number is one more than the previous digit. Return a sorted list of all the integers 阅读全文
posted @ 2022-04-04 23:15 Grandyang 阅读(431) 评论(0) 推荐(0) 编辑
摘要:Given head which is a reference node to a singly-linked list. The value of each node in the linked list is either 0 or 1. The linked list holds the bi 阅读全文
posted @ 2022-03-25 22:55 Grandyang 阅读(431) 评论(0) 推荐(0) 编辑
摘要:Given an n x n integer matrix grid, return the minimum sum of a falling path with non-zero shifts. A falling path with non-zero shifts is a choice of 阅读全文
posted @ 2022-03-25 11:01 Grandyang 阅读(610) 评论(0) 推荐(0) 编辑
摘要:Given an array intervals where intervals[i] = [li, ri] represent the interval [li, ri), remove all intervals that are covered by another interval in t 阅读全文
posted @ 2022-03-22 13:45 Grandyang 阅读(398) 评论(0) 推荐(0) 编辑
摘要:Given an integer array sorted in non-decreasing order, there is exactly one integer in the array that occurs more than 25% of the time, return that in 阅读全文
posted @ 2022-03-20 08:31 Grandyang 阅读(326) 评论(0) 推荐(0) 编辑
摘要:Design the CombinationIterator class: CombinationIterator(string characters, int combinationLength) Initializes the object with a string characters of 阅读全文
posted @ 2022-03-07 13:54 Grandyang 阅读(337) 评论(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 阅读(433) 评论(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 阅读(351) 评论(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 阅读(370) 评论(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 阅读(280) 评论(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 阅读(402) 评论(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 阅读(569) 评论(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 阅读(248) 评论(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 阅读(684) 评论(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 阅读(399) 评论(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 阅读(847) 评论(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 阅读(433) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 ··· 61 下一页
Fork me on GitHub