Book Image

Everyday Data Structures

By : William Smith
Book Image

Everyday Data Structures

By: William Smith

Overview of this book

Explore a new world of data structures and their applications easily with this data structures book. Written by software expert William Smith, you?ll learn how to master basic and advanced data structure concepts. ? Fully understand data structures using Java, C and other common languages ? Work through practical examples and learn real-world applications ? Get to grips with data structure problem solving using case studies
Table of Contents (20 chapters)
Everyday Data Structures
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
Free Chapter
1
Data Types: Foundational Structures

Case-study: music playlists


Business problem: A music streaming service wants to provide their users with a better streaming experience. Currently, user playlists are a simple collection of songs dumped into a bucket that provides no means of filtering or ordering the collection. The content management team has heard the complaints of their users and has tasked the engineering team with building a better playlist. 

This new playlist tool will have several key requirements. The more basic requirements include the ability to add and remove songs from the list, the ability to differentiate between an empty list and a list with elements, as well the ability to report on the total count of elements in the list. For those customers who are not interested in paying for the premium service, the lists will be limited to a 100 songs so our playlist tool must also have the ability to set a capacity and easily identify when the capacity has been met.

Additionally, many premium users are known to have...