討論串[閒聊] 每日leetcode
共 1548 篇文章
內容預覽:
你版都好猛,剩我剛才才想起來今天每日還沒寫了. C code怎麼這麼難寫. char* customSortString(char* order, char* s) {. char *res=(char*)malloc(sizeof(char)*(strlen(s)+1));. res[strlen
(還有432個字)
內容預覽:
791. Custom Sort String. 你板大師都好猛. 剩我只會水桶了. string customSortString(string order, string s) {. vector<int> cnt(26,0);. for(auto c : s). {. cnt[c-'a']++
(還有233個字)
內容預覽:
差不多思路. 先建order map. 然後把str變成Vec比對order map. 不在order map就塞後面. 最後拼回來. use std::collections::HashMap;. impl Solution {. pub fn custom_sort_string(order:
(還有341個字)