Explain how hash tables work and their time complexity.

Technical