討論串[閒聊] 每日LeetCode
共 719 篇文章

推噓1(1推 0噓 6→)留言7則,0人參與, 1年前最新作者oin1104 (是oin的說)時間1年前 (2024/01/28 17:05), 編輯資訊
0
0
0
內容預覽:
今天是問 在一個2d的陣列裡面. 有多少個子陣列加起來==target. 我用prefix sum做的. 然後我剛剛看. 好像可以用hashmap加上去做. 好扯喔. class Solution {. public:. int numSubmatrixSumTarget(vector<vector
(還有1632個字)

推噓4(4推 0噓 3→)留言7則,0人參與, 1年前最新作者wu10200512 (廷廷)時間1年前 (2024/01/26 22:20), 編輯資訊
0
0
0
內容預覽:
欸欸. 刷每日比較有料. 還是neetcode150刷到背起來比較有幫助. --. 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.231.130.198 (臺灣). 文章網址: https://www.ptt.cc/bbs/Marginalman/M.1706278857.A.94

推噓2(2推 0噓 0→)留言2則,0人參與, 1年前最新作者oin1104 (是oin的說)時間1年前 (2024/01/26 21:53), 編輯資訊
0
0
0
內容預覽:
我比較暴力一點. 直接在外面多弄一圈. 然後每次都用備用陣列看下一步能走到哪裡. 然後同時把外面那圈加起來就是答案. 我感覺明天要hard了. 嗚嗚嗚哇哇哇哇哇哇. class Solution {. public:. int findPaths(int m, int n, int maxMove,
(還有1748個字)

推噓5(5推 0噓 0→)留言5則,0人參與, 1年前最新作者sustainer123 (caster )時間1年前 (2024/01/26 21:15), 編輯資訊
0
0
0
內容預覽:
Python3 Code:. class Solution:. def findPaths(self, m: int, n: int, maxMove: int, startRow: int,. startColumn: int) -> int:. moves = [(1,0),(0,1),(-1,
(還有321個字)

推噓2(2推 0噓 1→)留言3則,0人參與, 1年前最新作者Rushia (みけねこ的鼻屎)時間1年前 (2024/01/26 15:48), 編輯資訊
0
1
0
內容預覽:
576. Out of Boundary Paths. 給你一些數字 m = 列數, n = 行數, maxMove = 移動步數, startRow 和 startColumn為矩陣的出發座標,求出移動 1~maxMove 步後共有幾種結果會走出矩陣外外,因為數字很大要取MOD。. 1.模擬從起始
(還有1088個字)