classSolution{public:boolcanPermutePalindrome(string s){// 记录字符出现的次数int count[256]={0};for(size_t i =0; i < s.size();++i)++count[s[i]];// 记录字符出现次数为奇数的个数int flag =0;for(size_t i =0; i <256;++i)if(count[i]%2==1)++flag;if(flag >1)returnfalse;returntrue;}};
URL化
classSolution{public:string replaceSpaces(string S,int length){int front = length -1;int back = front;// 遍历找出空格个数for(int i =0; i < length;++i){if(S[i]==' '){back +=2;}}// 实际URL化后所需的空间大小S.resize(back +1);while(front != back){if(S[front]!=' '){S[back--]= S[front];}else{S[back--]='0';S[back--]='2';S[back--]='%';}--front;}return S;}};
classSolution{public:// A * B = A + A * (B - 1) = A + A + A * (B - 2) = ....intmultiply(int A,int B){if(B ==0)return0;if(B ==1)return A;return A +multiply(A, B -1);}};
介绍一篇2023年8月10日发表在Nature Immunology的文章
标题: Fibrosis induced by resident macrophages has divergent roles in pancreas inflammatory injury and PDAC
影响因子:30.5
DOI:https://doi.org/10.1038/s41590-023-01579-x …