7 kyu
Simple string division
343 of 1,073KenKamau
Description:
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. Good luck!
Please also try Simple remove duplicates
Fundamentals
Similar Kata:
Stats:
Created | Aug 27, 2018 |
Published | Aug 27, 2018 |
Warriors Trained | 3337 |
Total Skips | 102 |
Total Code Submissions | 5901 |
Total Times Completed | 1073 |
JavaScript Completions | 312 |
Python Completions | 343 |
Ruby Completions | 50 |
Haskell Completions | 37 |
Go Completions | 111 |
C++ Completions | 95 |
C# Completions | 66 |
Java Completions | 131 |
Total Stars | 59 |
% of votes with a positive feedback rating | 90% of 261 |
Total "Very Satisfied" Votes | 219 |
Total "Somewhat Satisfied" Votes | 31 |
Total "Not Satisfied" Votes | 11 |
Total Rank Assessments | 7 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |