I was given this problem to solve. I have only the slightest idea on how it should be implemented, and I'm all too new with programming and stuffs, and would love to hear your comments on this. 

Say given a string in the form "abc1234defgh567jk89", and I must create a new string "a1b2c3d5e6f7j8k9".

Note that there are corresponding [digits] & [characters] group and since there may be more of one type over the other, the output has only matching sequence and ignore extra digits or characters in this case '4' & 'g' & 'h'.

I know I will have to use 2 sets of **queues** to store both types of elements, but I do not know how else to proceed from here.

Would appreciate if you could share a pseudocode or a Java(prefably) version, since I am learning thru this language now.

Thank you.