1.1 Data Structures - key concepts

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

linked list

If a program requires fast insertion of new data, a ------ ---- is a better choice array

999

Inserting an item at the beginning of a 999-item array requires how many items to be shifted?

0

Inserting an item at the beginning of a 999-item linked list requires how many items to be shifted?

0

Inserting an item at the end of a 999-item array requires how many items to be shifted?

0

Inserting an item at the end of a 999-item linked list requires how many items to be shifted?

balance

Choosing the best data structure often requires determining which data structure provides a good ------- given expected uses.

accessing, updating, searching, inserting, removing

Operations performed on a data structure include --------- or -------- stored data, --------- for specific data, --------- new data, and --------data

type of data being stored and operations needed to preform on the data

The selection of data structures used in a program depends on both the [---- of ---- ----- ------- ]and the ---------- the program may ---- to ------- on that ----.

False A linked list stores an ordered list of items. The links in each node define the order in which items are stored.

True or False : A linked list stores items in an unspecified order

True The data stored in a list node can be a record with multiple subitems. Ex: A linked list storing employee data might use a record containing the employee's name, title, and salary. Also, the list node itself can be implemented as a record, having subitems for the data and the pointer to the next node.

True or False : A list node's data can store a record with multiple subitems

True A binary tree node can have no children, a single left or right child, or both a left and right child.

True or False : A node in binary tree can have zero, one, or two children

True Items stored in an array can be accessed using a positional index.

True or False: Items stored in an array can be accessed using a positional index

Graph

a data structure for representing connections among items, and consists of vertices connected by edges

Binary tree

a data structure in which each node stores data and has up to two children, known as a left child and a right child

Linked list

a data structure that stores an ordered list of items in nodes, where each node stores data and has a pointer to the next node

Array

a data structure that stores an ordered list of items, where each item is directly accessible by a positional index

Hash table

a data structure that stores unordered items by mapping (or hashing) each item to a location in an array

Min Heap

a tree that maintains the simple property that a node's key is less than or equal to the node's childrens' keys

data structure

a way of organizing, storing, and performing operations on data

Max Heap

is a tree that maintains the simple property that a node's key is greater than or equal to the node's childrens' keys

Record

is the data structure that stores subitems, often called fields, with a name associated with each subitem

edge

represents a connection between two vertices in a graph

vertex

represents an item in a graph


Ensembles d'études connexes

English File Advanced Vocabulary : Money

View Set

Resistance and the Abolition Movement

View Set