mirror of
https://github.com/CyC2018/Interview-Notebook.git
synced 2026-10-22 08:53:41 +00:00
@@ -230,7 +230,7 @@ Output:
|
||||
```java
|
||||
public String replaceSpace(StringBuffer str) {
|
||||
int P1 = str.length() - 1;
|
||||
for (int i = 0; i < str.length(); i++)
|
||||
for (int i = 0; i < P1+1; i++)
|
||||
if (str.charAt(i) == ' ')
|
||||
str.append("aa");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user