置頂 0%

This question on LeetCode is a similar question to the Permutations question I did yesterday. But it is more tricky and interesting to solve it. Today is totally another brainstorming day.

閱讀全文 »

This question on LeetCode is the similar question I solved during a live coding interview this week. After that, I took some time to review BFS and DFS. I believe this is a good opportunity to gain a more extensive understanding of them.

閱讀全文 »

This question on LeetCode was so interesting that I initially tried to find a pattern or rule to solve it. However, after an hour of unsuccessful attempts, I decided to write an easy and straightforward solution that I came up with. Later on, I discovered this Youtube video, which presents a more elegant and cleaner solution.

閱讀全文 »