Given an integer n, insert a dot ('.') as a thousand separator between every group of 3 digits starting from the right, and return the resulting value as a string.
Constraints:
0≤n≤231−1
Examples
Fetching Slides...
Understand the problem
Now, let’s take a moment to make sure you’ve correctly understood the problem. The quiz below helps you check if you’re solving the correct problem:
Thousand Separator
1.
What is the correct output for the input 0?
A.
"0"
B.
"0.000"
C.
"00"
D.
"."
1 / 3
Figure it out!
We have a game for you to play. Rearrange the logical building blocks to develop a clearer understanding of how to solve this problem.
Sequence - Vertical
Drag and drop the cards to rearrange them in the correct sequence
1
2
3
4
5
Try it yourself
Implement your solution in the following coding playground.
Given an integer n, insert a dot ('.') as a thousand separator between every group of 3 digits starting from the right, and return the resulting value as a string.
Constraints:
0≤n≤231−1
Examples
Fetching Slides...
Understand the problem
Now, let’s take a moment to make sure you’ve correctly understood the problem. The quiz below helps you check if you’re solving the correct problem:
Thousand Separator
1.
What is the correct output for the input 0?
A.
"0"
B.
"0.000"
C.
"00"
D.
"."
1 / 3
Figure it out!
We have a game for you to play. Rearrange the logical building blocks to develop a clearer understanding of how to solve this problem.
Sequence - Vertical
Drag and drop the cards to rearrange them in the correct sequence
1
2
3
4
5
Try it yourself
Implement your solution in the following coding playground.