mirror of
https://github.com/devenperez/leetcode.git
synced 2026-06-13 14:57:08 +00:00
7 lines
157 B
C
7 lines
157 B
C
char * replaceDigits(char * s){
|
|
int len = strlen(s);
|
|
for (int i = 1; i < len; i += 2) {
|
|
s[i] = s[i - 1] + (s[i] - '0');
|
|
}
|
|
return s;
|
|
} |