Round 1
Questions:
You are given a string s
and a number k
. String s
is beautiful if s[i] = s[i + k]
.
Example:
k = 2
,s1 = "252525"
,s2 = "234234"
, s1 is beautiful, s2 is not beautiful.
To make a string beautiful, you can change the digits. Eg. given k = 2
and s = "1234"
, turning it into "1212"
would make it beautiful, but 1212 < 1234
. Hence, you modify it into "1313"
.
Return beautiful string.
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.