摘要: https://leetcode.com/problems/path-sum-iii/ https://leetcode.com/problems/path-sum-iv/ https://leetcode.com/problems/maximum-product-of-three-numbers/ 阅读全文
posted @ 2020-01-05 10:23 Dylan_Java_NYC 阅读(235) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2018-09-04 04:29 Dylan_Java_NYC 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/jump-game-v/description/ 题目: Given an array of integers arr and an integer d. In one step you can jump from inde 阅读全文
posted @ 2024-04-22 01:00 Dylan_Java_NYC 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/rank-transform-of-an-array/description/ 题目: Given an array of integers arr, replace each element with its rank. 阅读全文
posted @ 2024-04-21 22:48 Dylan_Java_NYC 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/spiral-matrix-iv/description/ 题目: You are given two integers m and n, which represent the dimensions of a matrix 阅读全文
posted @ 2024-04-21 10:44 Dylan_Java_NYC 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/diagonal-traverse-ii/description/ 题目: Given a 2D integer array nums, return all elements of nums in diagonal ord 阅读全文
posted @ 2024-04-21 10:04 Dylan_Java_NYC 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/sum-of-nodes-with-even-valued-grandparent/description/ 题目: Given the root of a binary tree, return the sum of va 阅读全文
posted @ 2024-04-17 12:46 Dylan_Java_NYC 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/minimum-time-to-collect-all-apples-in-a-tree/description/ 题目: Given an undirected tree consisting of n vertices 阅读全文
posted @ 2024-04-15 10:29 Dylan_Java_NYC 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/number-of-visible-people-in-a-queue/description/ 题目: There are n people standing in a queue, and they numbered f 阅读全文
posted @ 2024-04-09 11:40 Dylan_Java_NYC 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/split-message-based-on-limit/description/ 题目: You are given a string, message, and a positive integer, limit. Yo 阅读全文
posted @ 2024-04-07 11:37 Dylan_Java_NYC 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/find-the-kth-smallest-sum-of-a-matrix-with-sorted-rows/description/ 题目: You are given an m x n matrix mat that h 阅读全文
posted @ 2024-04-07 10:22 Dylan_Java_NYC 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/minimum-number-of-days-to-make-m-bouquets/description/ 题目: You are given an integer array bloomDay, an integer m 阅读全文
posted @ 2024-04-07 00:02 Dylan_Java_NYC 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/cutting-ribbons/description/ 题目: You are given an integer array ribbons, where ribbons[i] represents the length 阅读全文
posted @ 2024-04-06 23:32 Dylan_Java_NYC 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/kth-missing-positive-number/description/ 题目: Given an array arr of positive integers sorted in a strictly increa 阅读全文
posted @ 2024-04-05 10:33 Dylan_Java_NYC 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/maximum-sum-of-distinct-subarrays-with-length-k/description/ 题目: You are given an integer array nums and an inte 阅读全文
posted @ 2024-04-03 11:32 Dylan_Java_NYC 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/number-of-substrings-containing-all-three-characters/description/ 题目: Given a string s consisting only of charac 阅读全文
posted @ 2024-04-03 11:02 Dylan_Java_NYC 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/sort-array-by-parity/description/ 题目: Given an integer array nums, move all the even integers at the beginning o 阅读全文
posted @ 2024-04-01 10:57 Dylan_Java_NYC 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/adding-spaces-to-a-string/description/ 题目: You are given a 0-indexed string s and a 0-indexed integer array spac 阅读全文
posted @ 2024-04-01 10:45 Dylan_Java_NYC 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/product-of-two-run-length-encoded-arrays/description/ 题目: Run-length encoding is a compression algorithm that al 阅读全文
posted @ 2024-03-31 00:47 Dylan_Java_NYC 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/making-a-large-island/description/ 题目: You are given an n x n binary matrix grid. You are allowed to change at m 阅读全文
posted @ 2024-03-25 03:32 Dylan_Java_NYC 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/shortest-path-in-a-hidden-grid/description/ 题目: This is an interactive problem. There is a robot in a hidden gri 阅读全文
posted @ 2024-03-24 09:56 Dylan_Java_NYC 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/sum-of-distances-in-tree/description/ 题目: There is an undirected connected tree with n nodes labeled from 0 to n 阅读全文
posted @ 2024-03-23 23:18 Dylan_Java_NYC 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/count-nodes-equal-to-average-of-subtree/description/ 题目: Given the root of a binary tree, return the number of n 阅读全文
posted @ 2024-03-21 11:22 Dylan_Java_NYC 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/maximum-level-sum-of-a-binary-tree/description/ 题目: Given the root of a binary tree, the level of its root is 1, 阅读全文
posted @ 2024-03-20 10:36 Dylan_Java_NYC 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/recover-a-tree-from-preorder-traversal/description/ 题目: We run a preorder depth-first search (DFS) on the root o 阅读全文
posted @ 2024-03-20 10:08 Dylan_Java_NYC 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/print-immutable-linked-list-in-reverse/description/题目: You are given an immutable linked list, print out all val 阅读全文
posted @ 2024-03-18 05:35 Dylan_Java_NYC 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/design-skiplist/description/ 题目: Design a Skiplist without using any built-in libraries. A skiplist is a data st 阅读全文
posted @ 2024-03-18 02:42 Dylan_Java_NYC 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/dot-product-of-two-sparse-vectors/description/ 题目: Given two sparse vectors, compute their dot product. Implemen 阅读全文
posted @ 2024-03-03 03:48 Dylan_Java_NYC 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/finding-the-number-of-visible-mountains/description/ 题目: You are given a 0-indexed 2D integer array peaks where  阅读全文
posted @ 2024-03-01 13:08 Dylan_Java_NYC 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/buildings-with-an-ocean-view/description/题目: There are n buildings in a line. You are given an integer array hei 阅读全文
posted @ 2024-02-29 13:13 Dylan_Java_NYC 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/check-if-a-parentheses-string-can-be-valid/description/题目: A parentheses string is a non-empty string consisting 阅读全文
posted @ 2024-02-25 03:01 Dylan_Java_NYC 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/maximum-depth-of-n-ary-tree/description/ 题目: Given a n-ary tree, find its maximum depth. The maximum depth is th 阅读全文
posted @ 2023-02-10 09:36 Dylan_Java_NYC 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/height-of-binary-tree-after-subtree-removal-queries/ 题目: You are given the root of a binary tree with n nodes. E 阅读全文
posted @ 2022-10-30 13:28 Dylan_Java_NYC 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/count-number-of-nice-subarrays/ 题目: Given an array of integers nums and an integer k. A continuous subarray is c 阅读全文
posted @ 2022-10-29 13:15 Dylan_Java_NYC 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/shortest-path-to-get-food/ 题目: You are starving and you want to eat food as quickly as possible. You want to fin 阅读全文
posted @ 2022-10-23 06:28 Dylan_Java_NYC 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/number-of-subarrays-with-bounded-maximum/ 题目: Given an integer array nums and two integers left and right, retur 阅读全文
posted @ 2022-10-16 14:30 Dylan_Java_NYC 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/count-subarrays-with-fixed-bounds/ 题目: You are given an integer array nums and two integers minK and maxK. A fix 阅读全文
posted @ 2022-10-16 14:17 Dylan_Java_NYC 阅读(441) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/print-in-order/ 题目: Suppose we have a class: public class Foo { public void first() { print("first"); } public v 阅读全文
posted @ 2022-10-14 13:12 Dylan_Java_NYC 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/print-foobar-alternately/ 题目: Suppose you are given the following code: class FooBar { public void foo() { for ( 阅读全文
posted @ 2022-10-14 12:22 Dylan_Java_NYC 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/the-dining-philosophers/ 题目: Five silent philosophers sit at a round table with bowls of spaghetti. Forks are pl 阅读全文
posted @ 2022-10-14 12:03 Dylan_Java_NYC 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/print-zero-even-odd/ 题目: You have a function printNumber that can be called with an integer parameter and prints 阅读全文
posted @ 2022-10-14 09:54 Dylan_Java_NYC 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/fizz-buzz-multithreaded/ 题目: You have the four functions: printFizz that prints the word "fizz" to the console, 阅读全文
posted @ 2022-10-11 14:12 Dylan_Java_NYC 阅读(83) 评论(0) 推荐(0) 编辑