Re: [閒聊] 每日leetcode

看板Marginalman作者 (通通打死)時間1年前 (2024/08/26 08:38), 編輯推噓1(101)
留言2則, 2人參與, 1年前最新討論串765/1548 (看更多)
剩easy能給我一點信心了 今天想這題花了38分鐘 void helper(Node* root, vector<int>& ans) { if(!root) { return; } for(auto n : root->children) { helper(n, ans); } ans.push_back(root->val); } vector<int> postorder(Node* root) { vector<int> ans; helper(root, ans); return ans; } -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 125.229.37.69 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Marginalman/M.1724632725.A.D61.html

08/26 08:40, 1年前 , 1F
大師
08/26 08:40, 1F

08/26 09:14, 1年前 , 2F
剩我不會了
08/26 09:14, 2F
文章代碼(AID): #1coywLrX (Marginalman)
討論串 (同標題文章)
文章代碼(AID): #1coywLrX (Marginalman)