Gary Lai

199. Binary Tree Right Side View

199. Binary Tree Right Side View 這一題和 116. Populating Next

841. Keys and Rooms

841. Keys and Rooms 透過拿到的鑰匙來造訪後面的房間,是圖形搜索的一種問題。 class Solution: def canVisitAllRooms(

201. Bitwise AND of Numbers Range

201. Bitwise AND of Numbers Range class Solution: def rangeBitwiseAnd(

190. Reverse Bits

190. Reverse Bits class Solution: def reverseBits(self, n: int)

405. Convert a Number to Hexadecimal

405. Convert a Number to Hexadecimal 💡這個題目有一個知識點需要先複習:「二補數」 class Solution:

504. Base 7

504. Base 7 class Solution: def convertToBase7(self, num: int)

872. Leaf-Similar Trees

872. Leaf-Similar Trees # Definition for a binary tree node. # class

2095. Delete the Middle Node of a Linked List

2095. Delete the Middle Node of a Linked List # Definition

747. Largest Number At Least Twice of Others

747.Largest Number At Least Twice of Others 這一題是一個簡單的題目,解題的主要邏輯:

1466. Reorder Routes to Make All Paths Lead to the City Zero

1466. Reorder Routes to Make All Paths Lead to the