Q:

How to remove characters in str2 when there is a match for a character from str1?

I have tried to remove the characters in str2 when there is a match for a character from str1.Suppose if the string2 is "Haelloi Waoruld" and string1 is "aiu" then after removing the each character from string 1 in strin2 , the string2 looks like : "Hello World"
Though I could solve this with normal string operations, I was asked to implement the same using hash table concept from C language . I have no idea how to implement this in hash table.
Can anyone help me with the algorithm for the same ?

A:

Go over str1, create a boolean table indexed by character with true if the character is in str1. Then go over str2 and output only characters for which the value in the table is false.

