原创 701. Insert into a Binary Search Tree

題目 https://leetcode.com/problems/insert-into-a-binary-search-tree/ Given the root node of a binary search tree (BST)

原创 938. Range Sum of BST

題目 Given the root node of a binary search tree, return the sum of values of all nodes with value between L and R (inc

原创 942. DI String Match

題目 Given a string S that only contains “I” (increase) or “D” (decrease), let N = S.length. Return any permutation A o

原创 坑!IDEA如何將依賴的模塊導入Jar包

如果想將依賴的庫在導出jar的時候也可以用到,那麼直接從右邊的【Available Elements】中拖到左邊是沒用的。 對着右邊的東西點右鍵,有兩個菜單 1【Put into Output Root】 2【Extract int

原创 814. Binary Tree Pruning

題目 https://leetcode.com/problems/binary-tree-pruning/ We are given the head node root of a binary tree, where additio

原创 890. Find and Replace Pattern

https://leetcode.com/problems/find-and-replace-pattern/ 題目 You have a list of words and a pattern, and you want to kn

原创 977. Squares of a Sorted Array

題目 Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also i

原创 27. Remove Element

題目 Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not

原创 535. Encode and Decode TinyURL

題目 https://leetcode.com/problems/encode-and-decode-tinyurl/ Note: This is a companion problem to the System Design pr

原创 35. Search Insert Position

題目 Given a sorted array and a target value, return the index if the target is found. If not, return the index where i

原创 976. Largest Perimeter Triangle

題目 鏈接:https://leetcode.com/problems/largest-perimeter-triangle/ Given an array A of positive lengths, return the larg

原创 994. Rotting Oranges

題目 In a given grid, each cell can have one of three values: the value 0 representing an empty cell; the value 1 repr

原创 807. Max Increase to Keep City Skyline

題目 In a 2 dimensional array grid, each value grid[i][j] represents the height of a building located there. We are all

原创 921. Minimum Add to Make Parentheses Valid

題目 Given a string S of ‘(’ and ‘)’ parentheses, we add the minimum number of parentheses ( ‘(’ or ‘)’, and in any pos

原创 894. All Possible Full Binary Trees

題目 https://leetcode.com/problems/all-possible-full-binary-trees/ A full binary tree is a binary tree where each node