Skip to content

Latest commit

 

History

History

simple-string-division

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

In this Kata, you will be given a number in form of a string and an integer k and your task is to insert k commas into the string and determine which of the partitions is the largest.

For example:
solve('1234',1) = 234 because ('1','234') or ('12','34') or ('123','4').
solve('1234',2) = 34 because ('1','2','34') or ('1','23','4') or ('12','3','4'). 
solve('1234',3) = 4
solve('2020',1) = 202

More examples in test cases.