Sinopsis
this morning, you went to the back of a line to wait for the cashier. The line organized people chronologically. The first person in the line was the first to be served and to leave the line.
Eventually, you reached the front of the line and left the store with a bag containing your purchases. The items in the bag were in no particular order, and some of them were the same.
Do you see a stack of books or a pile of papers on your desk? It’s easy to look at or remove the top item of the stack or to add a new item to the top of the stack. The items in a stack also are organized chronologically, with the item added most recently on top and the item added first on
the bottom.
At your desk, you see your to-do list. Each entry in the list has a position that might or might not be important to you. You may have written them either as you thought of them, in their order of importance, or in alphabetical order. You decide the order; the list simply provides places for your entries.
Your dictionary is an alphabetical list of words and their definitions. You search for a word and get its definition. If your dictionary is printed, the alphabetical organization helps you to locate a word quickly. If your dictionary is computerized, its alphabetical organization is hidden, but it still speeds the search.
Speaking of your computer, you have organized your files into folders, or directories. Each folder contains several other folders or files. This type of organization is hierarchical. If you drew a picture of it, you would get something like a family tree or a chart of a company’s internal departments. These data organizations are similar and are called trees.
Finally, notice the road map that you are using to plan your weekend trip. The diagram of roads and towns shows you how to get from one place to another. Often, several ways are possible. One way might be shorter, another faster. The road map has an organization known as a graph.
Content
- Bags
- Bag Implementations That Use Arrays
- A Bag Implementation That Links Data
- The Efficiency of Algorithms
- Stacks
- Stack Implementations
- Recursion
- An Introduction to Sorting
- Faster Sorting Methods
- Queues, Deques, and Priority Queues
- Queue, Deque, and Priority Queue Implementations
- Lists
- List Implementations That Use Arrays
- A List Implementation That Links Data
- Iterators
- Sorted Lists
- Inheritance and Lists
- Searching
- Dictionaries
- Dictionary Implementations
- Introducing Hashing
- Hashing as a Dictionary Implementation
- Trees
- Tree Implementations
- A Binary Search Tree Implementation
- A Heap Implementation
- Balanced Search Trees
- Graphs
- Mutable, Immutable, and Cloneable Objects
0 komentar:
Posting Komentar