Category: codeing

二元樹的遍歷方法(js)

迭代方法: :一個陣列,在迭代中,透過 新增工作,透過 進行工作。 :一個陣列,在迭代中,透過 新增工作,透過 進行工作。 遞迴方法:透過函數的遞迴呼叫來進行 迭代方法。 Breadth First Search,BFS Depth First Search,DFS…
Read More →

JS 的迴圈優化筆記

關於如何微優化迴圈(在不優先考慮可讀性的條件下,也就是說,通常不會在前端工作環境中需要考慮): 在陣列較大的時候,迴圈的執行速度:負向 > 正向 = >> > 。 在陣列較小的時候, 是最快的。 在 迴圈中,使用 來宣告 index…
Read More →

Leetcode 練習:2021-12-09

Roman to Integer 題號:13 Longest Common Prefix 題號:14 Jump Game III 題號:1306
Read More →

Leetcode 練習:2021-12-11

Nth Magical Number 題號:878
Read More →

Leetcode 練習:2021-12-10

Valid Parentheses 題號:20 Merge Two Sorted Lists 題號:21 Domino and Tromino Tiling 題號:790
Read More →

Leetcode 練習:2021-12-12

Partition Equal Subset Sum 題號:416
Read More →

Leetcode 練習:2021-12-13

Remove Duplicates from Sorted Array 題號:26 Remove Element 題號:27 Consecutive Characters 題號:1446
Read More →

Leetcode 練習:2021-12-15

Maximum Subarray 題號:53 Length of Last Word 題號:58 Insertion Sort List 題號:147
Read More →

Leetcode 練習:2021-12-14

Implement strStr() 題號:28 Search Insert Position 題號:35 Range Sum of BST 題號:938
Read More →

Leetcode 練習:2021-12-16

Plus One 題號:66 Add Binary 題號:67 Minimum Height Trees 題號:310
Read More →

Leetcode 練習:2021-12-17

Sqrt(x) 題號:69 Climbing Stairs 題號:70
Read More →

Leetcode 練習:2021-12-20

Remove Duplicates from Sorted List 題號:83 Merge Sorted Array 題號:88 Find Good Days to Rob the Bank 題號:2100 Minimum Absolute Difference 題號:1200
Read More →

Leetcode 練習:2021-12-23

Convert Sorted Array to Binary Search Tree 題號:108 Balanced Binary Tree 題號:110 Course Schedule II 題號:210
Read More →

Leetcode 練習:2021-12-24

Minimum Depth of Binary Tree 題號:111 Path Sum 題號:112 Merge Intervals 題號:56
Read More →

Leetcode 練習:2021-12-25

Basic Calculator II 題號:227
Read More →

Leetcode 練習:2021-12-26

K Closest Points to Origin 題號:973
Read More →

Leetcode 練習:2021-12-27

Pascal’s Triangle 題號:118 Pascal’s Triangle II 題號:119 令 ,第 項的係數是 。 Number Complement 題號:476 令 , 的最大位數為 ,欲求結果為 ,有 。 bitwise
Read More →

Leetcode 練習:2021-12-28

Best Time to Buy and Sell Stock 題號:121 Valid Palindrome 題號:125 Middle of the Linked List 題號:876
Read More →

Leetcode 練習:2021-12-29

Single Number 題號:136 Linked List Cycle 題號:141 Populating Next Right Pointers in Each Node 題號:116
Read More →

Leetcode 練習:2021-12-30

Binary Tree Preorder Traversal 題號:141 Binary Tree Postorder Traversal 題號:145 Binary Tree Inorder Traversal 題號:94 Smallest Integer Divisible…
Read More →

Leetcode 練習:2021-12-31

Min Stack 題號:155 Two Sum II - Input Array Is Sorted 題號:167 Maximum Difference Between Node and Ancestor 題號:1026
Read More →

Leetcode 練習:2022-01-03

Find the Town Judge 題號:997
Read More →

Leetcode 練習:2022-01-04

Complement of Base 10 Integer 題號:1009
Read More →

Leetcode 練習:2022-01-02

Pairs of Songs With Total Durations Divisible by 60 題號:1010
Read More →

Leetcode 練習:2022-01-01

Burst Balloons 題號:31…
Read More →

Leetcode 練習:2022-01-06

Car Pooling 題號:1094
Read More →