Remove characters from string1 present in string2
Filed under PayU
The question
Given two strings, write code to remove all characters from the first string that appear in the second string in O(N) time and constant space.
No write-up yet. Related questions below have one.
Related PayU questions
Collected from public candidate posts and coding forums. Updated Nov 2026.