Abstract
In Chap. 5 we covered data structures that support insertion, deletion, membership testing, and iteration. For some applications testing membership may be enough. Iteration and deletion may not be necessary. The classic example is that of a spell checker. Consider the job of a spell checker. A simple one may detect errors in spelling while a more advanced spell checker may suggest alternatives of correctly spelled words.
Clearly a spell checker is provided with a large dictionary of words. Using the list of words the spell checker determines whether a word you have is in the dictionary and therefore a correct word. If the word does not appear in the dictionary the word processor or editor may underline the word indicating it may be incorrectly spelled. In some cases the word processor may suggest an alternative, correctly spelled word. In some cases, the word processor may simply correct the misspelling. How do these spell checkers/correctors work? What kind of data structures do they use?
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this chapter
Cite this chapter
Lee, K.D., Hubbard, S. (2015). Membership Structures. In: Data Structures and Algorithms with Python. Undergraduate Topics in Computer Science. Springer, Cham. https://doi.org/10.1007/978-3-319-13072-9_8
Download citation
DOI: https://doi.org/10.1007/978-3-319-13072-9_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-13071-2
Online ISBN: 978-3-319-13072-9
eBook Packages: Computer ScienceComputer Science (R0)