討論串[閒聊] 每日leetcode
共 1548 篇文章

推噓2(2推 0噓 2→)留言4則,0人參與, 1年前最新作者JIWP (神楽めあ的錢包)時間1年前 (2024/03/11 23:00), 編輯資訊
0
0
0
內容預覽:
你版都好猛,剩我剛才才想起來今天每日還沒寫了. C code怎麼這麼難寫. char* customSortString(char* order, char* s) {. char *res=(char*)malloc(sizeof(char)*(strlen(s)+1));. res[strlen
(還有432個字)

推噓2(2推 0噓 5→)留言7則,0人參與, 1年前最新作者DJYOSHITAKA (franchouchouISBEST)時間1年前 (2024/03/11 22:53), 1年前編輯資訊
0
0
0
內容預覽:
791. Custom Sort String. 你板大師都好猛. 剩我只會水桶了. string customSortString(string order, string s) {. vector<int> cnt(26,0);. for(auto c : s). {. cnt[c-'a']++
(還有233個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者yam276 (史萊哲林的優等生)時間1年前 (2024/03/11 22:02), 編輯資訊
0
0
1
內容預覽:
差不多思路. 先建order map. 然後把str變成Vec比對order map. 不在order map就塞後面. 最後拼回來. use std::collections::HashMap;. impl Solution {. pub fn custom_sort_string(order:
(還有341個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者UsadaBeguora (兔田背鍋拉)時間1年前 (2024/03/11 19:37), 編輯資訊
0
0
0
內容預覽:
寫到一半發現處長站在我後面看. 下午在產線躲了半天. 我要怎麼無聲無息地回去拿包包下班. 除了金蟬脫殼. 姆咪. --. 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.34.86.192 (臺灣). 文章網址: https://www.ptt.cc/bbs/Marginalman/M

推噓1(1推 0噓 1→)留言2則,0人參與, 1年前最新作者NCKUEECS (小惠我婆)時間1年前 (2024/03/11 11:56), 編輯資訊
0
0
1
內容預覽:
大師寫得好精簡我不獻醜了. 我用c寫 跑老半天都沒過. 最後發現忘記加'\0'. 我好爛:(. 恨c. --. 發信站: 批踢踢實業坊(ptt.cc), 來自: 218.164.231.134 (臺灣). 文章網址: https://www.ptt.cc/bbs/Marginalman/M.