Question : Given a list of addresses as a set of tuples/lists : street_number ,stree_name, city_name, state_name ; and a list of queries where each query is of length 4 but a possibility of NULL in the query example : ("A", NULL, "B", "C") NULL matches any address here. We want to design an address matcher and return a list of matched addresses like True/ False for each query.
I used Trie based solution for this got negative feedback. Is there a better approach? TIA.
Edit: I think I forgot to mention a few points. There can be multiple null values per query. Also the address might not be just characters they can be strings. Also by trie I meant 4 hashmaps each for street_number, street_name, city_name, state_name..etc.. and then querying it in a dfs fashion...


