Deloitte Interview Question

HashMap and HashSet Code Optimization Some SQL queries on Joins