05AB1E, 55 4 bytes
āÈ>×J€Ðιθ InputI/O as a list of characters, which is allowed by default.
I have the feeling 4 bytes might beI have the feeling 4 bytes might be possible, but I'm unable to find it.
It is possible, but I'm unableby porting @emanresuA's Vyxal answer (so make sure to find itupvote him/her as well).
Explanation:
ā # Take the (implicit) input-list, and push a list in the range [1,example input-length] # i.e.= ["a","b","c","d","e"] → [1,2,3,4,5]) È €Ð # Check forTriplicate each value in this list whether it's evencharacter (1 ifwhich truthy;remains 0a ifflattened falseylist) # → [0["a",1"a",0"a",1"b",0]"b","b","c","c","c","d","d","d","e","e","e"] > ι # Increase each value by 1 (thus 2Uninterleave ifthis truthy;list 1into iftwo falsey)parts # → [1[["a",2"a",1"b",2"c",1]"c","d","e","e"],["a","b","b","c","d","d","e"]] × θ # RepeatPop eachand characterleave injust the input-list that manysecond timespart # → ["a","bb""b","b","c","dd""d","d","e"] J # And join the list together to a single string # → "abbcdde" # (after which this is output implicitly as result)