set up parallel linear time algo using hash maps