Categories
Uncategorized

Subtract all the characters in S1 from a string S2

Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.

 

(Another problem from http://www1.cs.columbia.edu/~kns10/interview/)

Leave a Reply