摘要:
原题链接在这里:https://leetcode.com/problems/finding-the-number-of-visible-mountains/description/ 题目: You are given a 0-indexed 2D integer array peaks where 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/buildings-with-an-ocean-view/description/题目: There are n buildings in a line. You are given an integer array hei 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/check-if-a-parentheses-string-can-be-valid/description/题目: A parentheses string is a non-empty string consisting 阅读全文
摘要:
原题链接在这里: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 阅读全文
摘要:
原题链接在这里: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 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/count-number-of-nice-subarrays/ 题目: Given an array of integers nums and an integer k. A continuous subarray is c 阅读全文
摘要:
原题链接在这里: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 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/number-of-subarrays-with-bounded-maximum/ 题目: Given an integer array nums and two integers left and right, retur 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/count-subarrays-with-fixed-bounds/ 题目: You are given an integer array nums and two integers minK and maxK. A fix 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/print-in-order/ 题目: Suppose we have a class: public class Foo { public void first() { print("first"); } public v 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/print-foobar-alternately/ 题目: Suppose you are given the following code: class FooBar { public void foo() { for ( 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/the-dining-philosophers/ 题目: Five silent philosophers sit at a round table with bowls of spaghetti. Forks are pl 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/print-zero-even-odd/ 题目: You have a function printNumber that can be called with an integer parameter and prints 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/fizz-buzz-multithreaded/ 题目: You have the four functions: printFizz that prints the word "fizz" to the console, 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/using-a-robot-to-print-the-lexicographically-smallest-string/ 题目: You are given a string s and a robot that curr 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/number-of-matching-subsequences/ 题目: Given a string s and an array of strings words, return the number of words[ 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/minimum-number-of-frogs-croaking/ 题目: You are given the string croakOfFrogs, which represents a combination of t 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/linked-list-in-binary-tree/ 题目: Given a binary tree root and a linked list with head as the first node. Return T 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/max-sum-of-rectangle-no-larger-than-k/ 题目: Given an m x n matrix matrix and an integer k, return the max sum of 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/task-scheduler-ii/ 题目: You are given a 0-indexed array of positive integers tasks, representing tasks that need 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/deepest-leaves-sum/ 题目: Given the root of a binary tree, return the sum of values of its deepest leaves. Example 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/design-a-text-editor/ 题目: Design a text editor with a cursor that can do the following: Add text to where the cu 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/balance-a-binary-search-tree/ 题目: Given the root of a binary search tree, return a balanced binary search tree w 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/water-and-jug-problem/ 题目: You are given two jugs with capacities jug1Capacity and jug2Capacity liters. There is 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/find-original-array-from-doubled-array/ 题目: An integer array original is transformed into a doubled array change 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/maximum-score-from-performing-multiplication-operations/ 题目: You are given two integer arrays nums and multiplie 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/maximum-product-of-splitted-binary-tree/ 题目: Given the root of a binary tree, split the binary tree into two sub 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/the-number-of-weak-characters-in-the-game/ 题目: You are playing a game that contains multiple characters, and eac 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/find-nearest-point-that-has-the-same-x-or-y-coordinate/ 题目: You are given two integers, x and y, which represent 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/k-similar-strings/ 题目: Strings s1 and s2 are k-similar (for some non-negative integer k) if we can swap the posi 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/maximum-path-quality-of-a-graph/ 题目: There is an undirected graph with n nodes numbered from 0 to n - 1 (inclusi 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/minimum-number-of-steps-to-make-two-strings-anagram-ii/ 题目: You are given two strings s and t. In one step, you 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/minimum-number-of-steps-to-make-two-strings-anagram/ 题目: You are given two strings of the same length s and t. I 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/buddy-strings/ 题目: Given two strings s and goal, return true if you can swap two letters in s so the result is e 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/design-file-system/ 题目: You are asked to design a file system that allows you to create new paths and associate 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/subdomain-visit-count/ 题目: A website domain "discuss.leetcode.com" consists of various subdomains. At the top le 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/design-browser-history/ 题目: You have a browser of one tab where you start on the homepage and you can visit anot 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/step-by-step-directions-from-a-binary-tree-node-to-another/ 题目: You are given the root of a binary tree with n n 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/find-distance-in-a-binary-tree/ 题目: Given the root of a binary tree and two integers p and q, return the distanc 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/sum-of-total-strength-of-wizards/ 题目: As the ruler of a kingdom, you have an army of wizards at your command. Yo 阅读全文