Skip to content

Commit 1387c0f

Browse files
refactor 273
1 parent 7fec7d5 commit 1387c0f

File tree

1 file changed

+0
-15
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-15
lines changed

src/main/java/com/fishercoder/solutions/_273.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 273. Integer to English Words
5-
*
6-
* Convert a non-negative integer to its english words representation. Given input is guaranteed to be less than 231 - 1.
7-
8-
For example,
9-
123 -> "One Hundred Twenty Three"
10-
12345 -> "Twelve Thousand Three Hundred Forty Five"
11-
1234567 -> "One Million Two Hundred Thirty Four Thousand Five Hundred Sixty Seven"
12-
13-
Hint:
14-
Did you see a pattern in dividing the number into chunk of words? For example, 123 and 123000.
15-
Group the number by thousands (3 digits). You can write a helper function that takes a number less than 1000 and convert just that chunk to words.
16-
There are many edge cases. What are some good test cases? Does your code work with input such as 0? Or 1000010? (middle chunk is zero and should not be printed out)
17-
*/
183
public class _273 {
194

205
public static class Solution1 {

0 commit comments

Comments
 (0)