Swipe to navigate through the chapters of this book
This chapter highlights the important role of data structures as a natural companion to algorithms. The premise is that computers can only store and operate on primitive data types, which essentially means just numbers; if we need another data type (e.g., to represent an image, or an email), we need to design it ourselves by enforcing a format on numerical data.
The running example used is that of strings, which in theory are just sequences of characters. Faced with a practical need to represent strings in memory however, a range of options exist. By examining two different string data structures and a range of algorithms that operate on them, various trade-offs in terms of efficiency are highlighted: ultimately, what seem be subtle or unimportant differences have a major impact.
Please log in to get access to this content
Wikipedia: ASCII. http://en.wikipedia.org/wiki/ASCII
Wikipedia: ASCII art. http://en.wikipedia.org/wiki/ASCII_art
Wikipedia: Binary Coded Decimal (BCD). http://en.wikipedia.org/wiki/Binary-coded_decimal
Wikipedia: Bulletin Board System (BBS). http://en.wikipedia.org/wiki/Bulletin_board_system
Wikipedia: Pascal. http://en.wikipedia.org/wiki/Pascal_(programming_language)
Wikipedia: Programmed Data Processor (PDP). http://en.wikipedia.org/wiki/Programmed_Data_Processor
Wikipedia: “Schlemiel the painter’s” algorithm. http://en.wikipedia.org/wiki/Schlemiel_the_painter’s_Algorithm
- How Long Is a Piece of String?
- Springer International Publishing
- Sequence number
- Chapter number