1class Solution {2 public String thousandSeparator(int n) {34 StringBuffer str = new StringBuffer(Integer.toString(n));5 int index = str.length() - 3;67 while (index >= 1) {8 str.insert(index, '.');9 index = index - 3;10 }1112 return str.toString();13 }14}
WPM •0 •0
ACC •0 •0
TIME •0