Well, it doesn't look a daunting task, however you have to allocate a new array having the double size of the original one. Then you could copy the original items o[i] into new ones n[2*i], finally add the 'additional characters at odd indices. The inverse operation, is, well, inverse, namely n[2*i] -> o[i].