llllmz

导航

2024年3月1日

541. 反转字符串 II

摘要: void reversestring(char* s,int head,int tail){ while(head<=tail){ char temp=s[head]; s[head]=s[tail]; s[tail]=temp; head++; tail--; } } char* reverseS 阅读全文

posted @ 2024-03-01 15:24 神奇的萝卜丝 阅读(10) 评论(0) 推荐(0)

454. 四数相加 II c

摘要: typedef struct node{ int sum; int count; struct node* repeatnext; }hash; void init_hash(hash* h){ for(int i=0;i<128;i++){ h[i].sum=0; h[i].count=0; h[ 阅读全文

posted @ 2024-03-01 15:14 神奇的萝卜丝 阅读(27) 评论(0) 推荐(0)

151. 反转字符串中的单词 c

摘要: void reversestring(char* s,int head,int tail){ while(head<=tail){ char temp=s[head]; s[head]=s[tail]; s[tail]=temp; head++; tail--; } } char* reverseW 阅读全文

posted @ 2024-03-01 14:23 神奇的萝卜丝 阅读(11) 评论(0) 推荐(0)