Discuss the trade-offs between using a Hash Map versus a Tree-based data structure for a problem you worked on at HashedIn.