摘要:
1、单vector存储(20ms,75%;14MB,24%) 1 int countBinarySubstrings(string s) { 2 vector<int>arr; 3 int len=s.size(); 4 int i=0; 5 6 //计算每一段0或1的长度,相邻必不同 7 whil 阅读全文
1、单vector存储(20ms,75%;14MB,24%) 1 int countBinarySubstrings(string s) { 2 vector<int>arr; 3 int len=s.size(); 4 int i=0; 5 6 //计算每一段0或1的长度,相邻必不同 7 whil 阅读全文
posted @ 2021-10-03 10:49
夏天吃辣椒
阅读(35)
评论(0)
推荐(0)
摘要:
1、双unordered_map(0ms,100%;6.3MB,50%)C++ 1 bool wordPattern(string pattern, string str) { 2 unordered_map<char,string>str1; 3 unordered_map<string,char 阅读全文
1、双unordered_map(0ms,100%;6.3MB,50%)C++ 1 bool wordPattern(string pattern, string str) { 2 unordered_map<char,string>str1; 3 unordered_map<string,char 阅读全文
posted @ 2021-10-03 09:01
夏天吃辣椒
阅读(34)
评论(0)
推荐(0)
浙公网安备 33010602011771号