Gary Lai

1166. Design File System

1166. Design File System 這個題目滿好想到使用 Trie 的方式來實作的,不過邏輯上要注意幾點 1. 要如何確保

1926. Nearest Exit from Entrance in Maze

1926. Nearest Exit from Entrance in Maze 這個問題屬於 BFS 的問題

1751. Maximum Number of Events That Can Be Attended II

1751. Maximum Number of Events That Can Be Attended II

1992. Find All Groups of Farmland

1992. Find All Groups of Farmland class Solution: def findFarmland(

829. Consecutive Numbers Sum

829. Consecutive Numbers Sum 這個題目我覺得不用太糾結於最佳解,這個偏向數學題目,但是我覺的是很好的面試題目 首先第一的絕對是不能先去想要怎麼拆解數字,我是先停下來觀察了一下什麼是連續正整數相加。像是:

2300. Successful Pairs of Spells and Potions

2300. Successful Pairs of Spells and Potions class Solution: def

931. Minimum Falling Path Sum

931. Minimum Falling Path Sum class Solution: def minFallingPathSum(self,

63. Unique Paths II

63. Unique Paths II class Solution: def uniquePathsWithObstacles(self, obstacleGrid:

2218. Maximum Value of K Coins From Piles

2218. Maximum Value of K Coins From Piles 這一個題目和 188.

2342. Max Sum of a Pair With Equal Sum of Digits

2342. Max Sum of a Pair With Equal Sum of