
leetcode
leetcode
飒雷
这个作者很懒,什么都没留下…
展开
-
1528. 重新排列字符串
https://leetcode-cn.com/problems/shuffle-string/class Solution { public String restoreString(String s, int[] indices) { char[] a = s.toCharArray(); char[] b = new char[a.length]; int j = 0; for (int i : indices) { b[i] = a[j]; .原创 2021-03-08 20:23:29 · 210 阅读 · 0 评论 -
面试题 01.03. URL化
https://leetcode-cn.com/problems/string-to-url-lcci/class Solution { public String replaceSpaces(String S, int length) { S = S.substring(0, length)replace(" ", "%20"); return S; }}class Solution { public String replace.原创 2021-03-08 20:05:33 · 190 阅读 · 0 评论