06 2022 档案
摘要:原题链接在这里:https://leetcode.com/problems/search-in-a-binary-search-tree/ 题目: You are given the root of a binary search tree (BST) and an integer val. Fin
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/n-ary-tree-postorder-traversal/ 题目: Given the root of an n-ary tree, return the postorder traversal of its nodes
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/n-ary-tree-preorder-traversal/ 题目: Given the root of an n-ary tree, return the preorder traversal of its nodes'
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/sort-array-by-increasing-frequency/ 题目: Given an array of integers nums, sort the array in increasing order base
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/maximum-average-subtree/ 题目: Given the root of a binary tree, return the maximum average value of a subtree of t
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/unique-number-of-occurrences/ 题目: Given an array of integers arr, return true if the number of occurrences of ea
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/steps-to-make-array-non-decreasing/ 题目: You are given a 0-indexed integer array nums. In one step, remove all el
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/matrix-block-sum/ 题目: Given a m x n matrix mat and an integer k, return a matrix answer where each answer[i][j]
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/russian-doll-envelopes/ 题目: You are given a 2D array of integers envelopes where envelopes[i] = [wi, hi] represe
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/sum-of-subarray-ranges/ 题目: You are given an integer array nums. The range of a subarray of nums is the differen
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/sum-of-subarray-minimums/ 题目: Given an array of integers arr, find the sum of min(b), where b ranges over every
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/online-stock-span/ 题目: Design an algorithm that collects daily price quotes for some stock and returns the span
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/swapping-nodes-in-a-linked-list/ 题目: You are given the head of a linked list, and an integer k. Return the head
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/maximum-twin-sum-of-a-linked-list/ 题目: In a linked list of size n, where n is even, the ith node (0-indexed) of
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/k-radius-subarray-averages/ 题目: You are given a 0-indexed array nums of n integers, and an integer k. The k-radi
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/minimum-operations-to-reduce-x-to-zero/ 题目: You are given an integer array nums and an integer x. In one operati
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/find-a-peak-element-ii/ 题目: A peak element in a 2D grid is an element that is strictly greater than all of its a
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/ip-to-cidr/ 题目: An IP address is a formatted 32-bit unsigned integer where each group of 8 bits is printed as a
阅读全文