Data Structures and Abstract Data Types

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/17

flashcard set

Earn XP

Description and Tags

Flashcards reviewing key concepts of data structures and abstract data types.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

18 Terms

1
New cards

Abstract Data Type (ADT)

The facilities and functionality. What it does.

2
New cards

Data Structure

The data structure employed by the ADT. How it does what it does.

3
New cards

Implementation

The implementation of the data structure. How it is stored and manipulated.

4
New cards

Queue

An ordered collection of items which are added at one end, called the “tail,” and removed from the other end, called the “head”.

5
New cards

Queue()

Creates a new queue that is empty.

6
New cards

enqueue(item)

Adds a new item to the tail of the queue.

7
New cards

dequeue()

If not empty, removes the front item from the queue.

8
New cards

isEmpty()

Tests to see whether the queue is empty.

9
New cards

size()

Counts the number of items in the queue.

10
New cards

Why is it called “abstract”?

The definition of an ADT only mentions what operations can be performed but not how these operations will be implemented.

11
New cards

Data structure

The physical representation of the structure of the data being stored in memory.

12
New cards

Abstract data type

Both the data structure and the procedures/functions which manipulate that data structure.

13
New cards

Encapsulation

The only way the user can interact with a variable of that ADT is through an interface, a set of procedures that operate on the data structure.

14
New cards

“Strong” encapsulation

Details of how the data structure is actually stored can be completely hidden from the user.

15
New cards

Which language offers encapsulation?

Java

16
New cards

Upper bound (upb)

Index of the last element

17
New cards

Lower bound (lwb)

Index of the first element

18
New cards

Abstract data types (ADTs)

Emphasize the user’s point of view