Question: Write a function remove _ characters ( input _ string, to _ remove ) that takes two inputs: input _ string : a string to

Write a function remove_characters(input_string, to_remove) that takes two inputs:
input_string : a string to_remove: a string
and returns a string that is exactly the same as the input_string but without any of the characters in to_remove. Your function must have a running time complexity of O(n), where n represents the length of input_string.
For clarity, let m be the length of to_remove. Your code cannot have a running time complexity of O(mn) to receive full credit, it must be O(n).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!