286. Walls and Gates 286. Walls and Gates 題目給定一個矩陣,矩陣內有標記了牆與門,剩餘的點被標註成一個無限大的數值,意義為可以行走的點,要求把這些矩陣中除了門與牆以外的點,以該點到達附近最近的門的距離為何?
144. Binary Tree Preorder Traversal 144. Binary Tree Preorder Traversal # Definition for a binary tree
297. Serialize and Deserialize Binary Tree 297. Serialize and Deserialize Binary Tree 這一題可以透過 536. Construct Binary
588. Design In-Memory File System 588. Design In-Memory File System class TrieNode: def __init__(self)
19. Remove Nth Node From End of List 19. Remove Nth Node From End of List 這一題我的第一個想法是我先走一趟算出整個 Linked
271. Encode and Decode Strings 271. Encode and Decode Strings 這個題目的目的是要做到文字的轉碼,這個技術其實滿常見於資料的傳輸,因為資料在傳輸的時候是沒辦法保留原先的資料格式的,例如我們有一個陣列要傳輸,這個陣列一定要先經過轉碼後變成一串長文字才方便在網路上傳輸。