leetcode

6免費公開
leetcode
全部類型
免費與付費
最新發佈
最新發佈
avatar-avatar
Vedanta
2025/12/06
在解longestValidParentheses的時候一開始思路是這樣 由於"()"一直失敗所以問AI 他跟我說 你的原始程式碼出問題,不是「語法錯」而是方法論本質錯。 而我幫你做的那個 two-pass 左右掃描法,是一個完全不同的演算法,雖然乍看和你的「左右指針」很像,但本質完全不
Thumbnail
avatar-avatar
Vedanta
2025/12/06
在解longestValidParentheses的時候一開始思路是這樣 由於"()"一直失敗所以問AI 他跟我說 你的原始程式碼出問題,不是「語法錯」而是方法論本質錯。 而我幫你做的那個 two-pass 左右掃描法,是一個完全不同的演算法,雖然乍看和你的「左右指針」很像,但本質完全不
Thumbnail
avatar-avatar
Vedanta
2025/12/04
36. Valid Sudoku Medium Topics premium lock icon Companies Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated acco
Thumbnail
avatar-avatar
Vedanta
2025/12/04
36. Valid Sudoku Medium Topics premium lock icon Companies Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated acco
Thumbnail
avatar-avatar
Vedanta
2025/12/03
class Solution:     def isMatch(self, s: str, p: str) -> bool:         # i = s 的指標(小蛇目前走到哪)         # j = p 的指標(迷宮目前在哪個門)         i = 0         j
avatar-avatar
Vedanta
2025/12/03
class Solution:     def isMatch(self, s: str, p: str) -> bool:         # i = s 的指標(小蛇目前走到哪)         # j = p 的指標(迷宮目前在哪個門)         i = 0         j
avatar-avatar
Vedanta
2025/11/30
Sudoku 是經典的 Constraint Problem(約束問題)。 題目要求你把空格 . 填入 1~9,使得: 每一列(row)數字 1~9 各出現一次 每一行(column)數字 1~9 各出現一次 每一個 3×3 box(九宮格)數字 1~9 各出現一次 這種問題最典型
avatar-avatar
Vedanta
2025/11/30
Sudoku 是經典的 Constraint Problem(約束問題)。 題目要求你把空格 . 填入 1~9,使得: 每一列(row)數字 1~9 各出現一次 每一行(column)數字 1~9 各出現一次 每一個 3×3 box(九宮格)數字 1~9 各出現一次 這種問題最典型
avatar-avatar
Vedanta
2025/11/29
問題拆解 給定: 字串 s 單詞陣列 words,每個單詞長度相同 我們要找到所有的起始索引,使得從該位置開始的子字串, 正好是 words 裡所有單詞 任意排列 的拼接。 關鍵點: 單詞長度固定,假設為 word_len words 的總長度是 total_len = word_l
Thumbnail
avatar-avatar
Vedanta
2025/11/29
問題拆解 給定: 字串 s 單詞陣列 words,每個單詞長度相同 我們要找到所有的起始索引,使得從該位置開始的子字串, 正好是 words 裡所有單詞 任意排列 的拼接。 關鍵點: 單詞長度固定,假設為 word_len words 的總長度是 total_len = word_l
Thumbnail
全部類型
免費與付費
最新發佈
最新發佈
avatar-avatar
Vedanta
2025/12/06
在解longestValidParentheses的時候一開始思路是這樣 由於"()"一直失敗所以問AI 他跟我說 你的原始程式碼出問題,不是「語法錯」而是方法論本質錯。 而我幫你做的那個 two-pass 左右掃描法,是一個完全不同的演算法,雖然乍看和你的「左右指針」很像,但本質完全不
Thumbnail
avatar-avatar
Vedanta
2025/12/06
在解longestValidParentheses的時候一開始思路是這樣 由於"()"一直失敗所以問AI 他跟我說 你的原始程式碼出問題,不是「語法錯」而是方法論本質錯。 而我幫你做的那個 two-pass 左右掃描法,是一個完全不同的演算法,雖然乍看和你的「左右指針」很像,但本質完全不
Thumbnail
avatar-avatar
Vedanta
2025/12/04
36. Valid Sudoku Medium Topics premium lock icon Companies Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated acco
Thumbnail
avatar-avatar
Vedanta
2025/12/04
36. Valid Sudoku Medium Topics premium lock icon Companies Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated acco
Thumbnail
avatar-avatar
Vedanta
2025/12/03
class Solution:     def isMatch(self, s: str, p: str) -> bool:         # i = s 的指標(小蛇目前走到哪)         # j = p 的指標(迷宮目前在哪個門)         i = 0         j
avatar-avatar
Vedanta
2025/12/03
class Solution:     def isMatch(self, s: str, p: str) -> bool:         # i = s 的指標(小蛇目前走到哪)         # j = p 的指標(迷宮目前在哪個門)         i = 0         j
avatar-avatar
Vedanta
2025/11/30
Sudoku 是經典的 Constraint Problem(約束問題)。 題目要求你把空格 . 填入 1~9,使得: 每一列(row)數字 1~9 各出現一次 每一行(column)數字 1~9 各出現一次 每一個 3×3 box(九宮格)數字 1~9 各出現一次 這種問題最典型
avatar-avatar
Vedanta
2025/11/30
Sudoku 是經典的 Constraint Problem(約束問題)。 題目要求你把空格 . 填入 1~9,使得: 每一列(row)數字 1~9 各出現一次 每一行(column)數字 1~9 各出現一次 每一個 3×3 box(九宮格)數字 1~9 各出現一次 這種問題最典型
avatar-avatar
Vedanta
2025/11/29
問題拆解 給定: 字串 s 單詞陣列 words,每個單詞長度相同 我們要找到所有的起始索引,使得從該位置開始的子字串, 正好是 words 裡所有單詞 任意排列 的拼接。 關鍵點: 單詞長度固定,假設為 word_len words 的總長度是 total_len = word_l
Thumbnail
avatar-avatar
Vedanta
2025/11/29
問題拆解 給定: 字串 s 單詞陣列 words,每個單詞長度相同 我們要找到所有的起始索引,使得從該位置開始的子字串, 正好是 words 裡所有單詞 任意排列 的拼接。 關鍵點: 單詞長度固定,假設為 word_len words 的總長度是 total_len = word_l
Thumbnail