keep a pointer and just write the count with the corresponding character on the same character array.
On Mon, Mar 19, 2012 at 10:38 PM, ATul SIngh <atulsingh7...@gmail.com>wrote: > This was a MS question asked recently on Run length Decoding. I was > given > Input- a3b5c3d2 > > And the output should be ddcccbbbbbaaa > > Assuming that the memory given is sufficient to accomodate the whole > string. > And this conversion should be inplace. ie the output string should not > use another array. > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.