{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CS163_Week4_topic2

# CS163_Week4_topic2 - CS163 Data structures Week 4 topic 2...

This preview shows pages 1–10. Sign up to view the full content.

CS163: Data structures Week 4 – topic 2: “Table” abstract data type 6/2008

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
dbtien – Data structures What will be discussed? Work by “value” rather than “position” May be implemented using a variety of data structures such as arrays (statically, dynamically allocated) linear linked lists non-linear linked lists Today, we begin our introduction into non- linear linked lists by examining arrays of linked lists!
dbtien – Data structures Table ADTs The ADT's we have learned about so far are appropriate for problems that must manage data by the position of the data (the ADT operations for an Ordered List, Stack, and Queue are all position oriented). These operations insert data (at the ith position, the top of stack, or the rear of the queue); they delete data (at the ith position, the top of stack, or the front of the queue); they retrieve data and find out if the list is full or empty.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
dbtien – Data structures Table ADTs Tables manage data by its value! As with the other ADT's we have talked about, table operations can be implemented using arrays or linked lists. Valued Oriented ADTs allow you to: -- insert data containing a certain VALUE into a data structure -- delete a data item containing a certain VALUE from a data structure -- retrieve data and find out if the structure is empty or full.
dbtien – Data structures Table ADTs Applications that use value oriented ADTs are: ...finding the phone number of John Smith ...deleting all information about an employee with an ID # 4432

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
dbtien – Data structures Table ADTs When you think of an ADT table, think of a table of major cities in the world including the city/country/population, a table of To-Do-List items, or a table of addresses including names/addresses/phone number/birthday. Each entry in the table contains several pieces of information. It is designed to allow you to look up information by various search keys
dbtien – Data structures Table ADTs The basic operations that define an ADT Table are: (notice, various search keys!!) • Create an empty table (e.g., Create(Table)) • Insert an item into the table (e.g., Insert(Table,Newdata)) • Delete an item from the table (e.g., Delete(Table, Key)) • Retrieve an item from the table (e.g., Retrieve(Table, Key, Returneddata))

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
dbtien – Data structures Table ADTs But, just like before, you should realize that these operations are only one possible set of table operations. Your application might require either a subset of these operations or other operations not listed here. Or, it might be better to modify the definitions...to allow for duplicate items in a table.
dbtien – Data structures Table ADTs Does anyone see a problem with this approach so far?

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern