Imperva Interview Question

Write a function that prints common chars from 2 strings in run time N

Interview Answer

Anonymous

Sep 16, 2020

iterate over the 1st string, inserting each char into a dictionary, then iterate over the 2nd string and print every char that's already in the dictionary.