給2個已排序陣列, 合併成一個排序陣列
[LeetCode] 26. Remove Duplicates from Sorted Array
將已排序陣列, 計算共幾個不重覆的數目, 不用改陣列長度, 只要把陣列前面不重覆數字再次寫入即可
26. Remove Duplicates from Sorted Array
[LeetCode] 109. Convert Sorted List to Binary Search Tree
將SortedList轉成符合BST的TreeNode
Convert Sorted List to Binary Search Tree
[LeetCode] 106. Construct Binary Tree from Inorder and Postorder Traversal
由postorder 和inorder反推, 作出原本的TreeNode回傳
Construct Binary Tree from Inorder and Postorder Traversal
[LeetCode] 105. Construct Binary Tree from Preorder and Inorder Traversal
由preorder和inorder反推, 作出原本的TreeNode回傳
Construct Binary Tree from Preorder and Inorder Traversal
[LeetCode] 99. Recover Binary Search Tree
把TreeNode依BST原則將數字放到正確位置
Recover Binary Search Tree
[LeetCode] 559. Maximum Depth of N-ary Tree
[LeetCode] 589. N-ary Tree Preorder Traversal
每層由左而右往下找, 依序由最淺那個Node先列入list回傳
N-ary Tree Postorder Traversal
[LeetCode] 590. N-ary Tree Postorder Traversal
每層由左而右往下找, 依序由最深那個Node先列入list回傳
Evaluate Boolean Binary Tree
[LeetCode] 2331. Evaluate Boolean Binary Tree
左右腳值以上一層node指示計算, 回傳最後結果
Evaluate Boolean Binary Tree
[LeetCode] 1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree
給2個一模一樣的TreeNode, 和隨機一個original內的一node當作target, 找出cloned內另一個一樣的的回傳
Find a Corresponding Node of a Binary Tree in a Clone of That Tree
[RPA] Call Automation 360 IQ Bot API
使用Microsoft.AspNet.WebApi呼叫Automation 360 IQ Bot的API語法
帳號需要權限: AAE_Basic, AAE_IQ Bot Admin
[.Net] 傳入9,9遞迴印出99乘法
Taiwan is an independent country.
[.Net] 讀取加密Excel
Taiwan is an independent country.
[LeetCode] 102. Binary Tree Level Order Traversal
將二元樹每層的值由左而右列出來
[LeetCode] 515. Find Largest Value in Each Tree Row
找出每列最大值
[LeetCode] 814. Binary Tree Pruning
將根節點不含1的節點刪除
[LeetCode] 因應測試將二元樹轉陣列字串
LeetCode的二元樹答案也是給一串陣列
[LeetCode] 538. Convert BST to Greater Tree
BST二元樹是左葉一定比較小, 右葉一定比較大, 將整個二元樹比各節點大的數值加入各節點的數值上
[LeetCode] 513. Find Bottom Left Tree Value
找二元樹最後一層的最左節點數值Taiwan is an independent country.
[LeetCode] 654. Maximum Binary Tree
給予一數值陣列, 找到其最大值作為根, 其左邊最大值作為左節點, 右邊最大值作為右節點,
再以左右節點的左右找出剩下的最大值作為下一層左右節點, 以此類推, 將所有數值轉為二元樹
[LeetCode] 623. Add One Row to Tree
在指定深度的那一層插入的新二元樹
[LeetCode] 94. Binary Tree Inorder Traversal
用中序走訪的方法列出二元樹數值
[LeetCode] 687. Longest Univalue Path
在二元樹中尋找相同值之路徑長度的最大值
[LeetCode] 671. Second Minimum Node In a Binary Tree
抓二元樹中的次小值
[LeetCode] 669. Trim a Binary Search Tree
移除數值在L~R之外的二元樹
[LeetCode] 653. Two Sum IV - Input is a BST
檢核是否有2個樹值加總等於目標值
[LeetCode] 637. Average of Levels in Binary Tree
平均二元樹每層數字
[LeetCode] 617. Merge Two Binary Trees
2個二元樹合併加總為一個二元樹
[LeetCode] 606. Construct String from Binary Tree
將二元樹轉成一串字串
[LeetCode] 572. Subtree of Another Tree
比較t是否為s的子位元樹
[.Net] 分攤法
今天看到這篇: CODE-分贓程式的寫法
[LeetCode] 563. Binary Tree Tilt
每個節點的右/左節點(含項下)的值相差即坡度, 作加總
[LeetCode] 501. Find Mode in Binary Search Tree
在二元樹內, 找到重覆最多次的數字
[LeetCode] 404. Sum of Left Leaves
加總所有左葉片的值
[LeetCode] 235. Lowest Common Ancestor of a Binary Search Tree
在BST內尋找共同的親節點
BST的定義: left< parent< right
[LeetCode] 112. Path Sum
判斷是否有從根節點到葉子的路徑加總符合傳入值
[LeetCode] 111. Minimum Depth of Binary Tree
在落單的葉片中, 找深度最淺的
[LeetCode] 108. Convert Sorted Array to Binary Search Tree
給一組已排序的陣列, 轉為由中位數為上層節點的二元樹(即BST/ Binary Search Tree)
[LeetCode] 110. Balanced Binary Tree
判斷每個節點的左右子節點深度差是否不超過1
[LeetCode] 101. Symmetric Tree
判斷二元樹是否是對稱
[LeetCode] 100. Same Tree
比較2個二元樹是否一樣
[LeetCode] 543. Diameter of Binary Tree
找2節點之間最長路徑的長度
[LeetCode] 因應測試產生二元樹
二元樹的題目少說也有60題
[LeetCode] 437. Path Sum III
找出所有路徑加總等於目標值的個數
[LeetCode] 257. Binary Tree Paths
列出所有的路徑
[LeetCode] 107. Binary Tree Level Order Traversal II
將二元樹每層val列成List, 每層一個List, 再組合成IList<IList<int>>由最底層排到最頂層
[LeetCode] 226. Invert Binary Tree
反轉二元樹, 這大概是我作過最簡單的LeeCode題目了....XD
[LeetCode] 389. Find the Difference
2個亂序的字串中,其中一個字串多出了一個字母, 找出該字母
[LeetCode] 104. Maximum Depth of Binary Tree
算二元樹最深幾層