Used a simple iterative approach that maintained a variable that stored the current character. Mistake made was that I used string manipulation, which I wouldve changed had I had more time. Smarter solution would have been to declare an auxiliary array of boolean values representing whether the characters would be present in the string. Perform one pass where you set all the boolean values and a second to actually create the final string.