Book contents
- Computational Thinking for Life Scientists
- Reviews
- Computational Thinking for Life Scientists
- Copyright page
- Dedication
- Contents
- Introduction
- Part I: Programming in Python
- Part II: Sequences
- 3 Sets, Dictionaries, and Hashing
- 4 Biological Patterns and Regular Expressions
- Part III: Graphs and Networks
- Part IV: Images
- Part V: Limitations of Computing
- Index
3 - Sets, Dictionaries, and Hashing
from Part II: - Sequences
Published online by Cambridge University Press: 19 August 2022
- Computational Thinking for Life Scientists
- Reviews
- Computational Thinking for Life Scientists
- Copyright page
- Dedication
- Contents
- Introduction
- Part I: Programming in Python
- Part II: Sequences
- 3 Sets, Dictionaries, and Hashing
- 4 Biological Patterns and Regular Expressions
- Part III: Graphs and Networks
- Part IV: Images
- Part V: Limitations of Computing
- Index
Summary
In many contexts, we are required to handle a large collection of objects in a way that supports inserting a new object, finding if an object is present, and possibly deleting an object. These operations typically appear in a series of arbitrary length. We want all these operations to be done as efficiently as possible. Consider a search engine (and its underlying infrastructure) like Google or Bing. One makes a query (e.g., “who is the King of Asteria”) and gets a response in about 945,000 results (0.44 seconds). One of the basic techniques behind such efficient implementations of search is called hashing.
- Type
- Chapter
- Information
- Computational Thinking for Life Scientists , pp. 57 - 78Publisher: Cambridge University PressPrint publication year: 2022