Hossein
(Hossein Amerkashi)
#1
String Explosion
Given a string like “Code” return a string like “CCoCodCode”.
Examples:
stringExplode(Code) → CCoCodCode (transformation is like this: C, Co, Cod, Code)
stringExplode(abc) → aababc
stringExplode(ab) → ab
Requirement:
Minimum 3 characters
If less than 3, return the string itself
5 Likes
Hossein
(Hossein Amerkashi)
#3
Great job @Boban. That was fast @Boban let’s see if we get solutions from others
2 Likes
Boban
(Boban Stojmenovic)
#4
Surely as we have good coders
Btw, does blocks counts, if so then it’s 35
/Boban
3 Likes
vknow360
(Sunny Gupta)
#6
Are we ‘coders’ or ‘koders’ ?
Mine have 22 blocks
Here it is:
!
4 Likes
Hossein
(Hossein Amerkashi)
#7
@vknow360 I think your procedure would NOT return expected result if length < 3. Right?