Skip to content

pmatsinopoulos/format_integer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithm Test : Format Integer

Devise a function that takes an input 'n' (integer) and returns a string that is the decimal representation of that number grouped by commas after every 3 digits. You can't solve the task using a built-in formatting function that can accomplish the whole task on its own.

Assume: 0 <= n < 1000000000

1 -> "1"

10 -> "10"

100 -> "100"

1000 -> "1,000"

10000 -> "10,000"

100000 -> "100,000"

1000000 -> "1,000,000"

35235235 -> "35,235,235"

About

Algorithm Test - Format Integer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages