Find normalized list difference efficiently
Palo Alto NetworksSoftware Engineer · OnsiteLast updated
This question evaluates competency in computing normalized list differences, including string normalization, collection comparison, duplicate handling, and time and space complexity reasoning.
Given two lists of strings, list1 and list2, return all elements that appear in list1 but not in list2 after applying a consistent normalization step (e.g., lowercase and trimming). Describe and implement an efficient algorithm, including the data structures you would use, handling of duplicates, and the time and space complexities.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.