DSA 1: Data Structures

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

search, insert, delete, minimum, maximum, predecessor, successor

What are the common operations of a *Binary Search Tree*?

search, insert, delete

What are the common operations of a *Hash Table*?

search, insert, delete

What are the common operations of a *Linked List*?

max_heapify, build_max_heap, insert, extract_max, maximum, increase_key, heap_sort

What are the common operations of a *Max Heap*?

insert, maximum, extract_max, increase_key

What are the common operations of a *Priority Queue*?

enqueue, dequeue

What are the common operations of a *Queue*?

push, pop, peek

What are the common operations of a *Stack*?

index

What are the common operations of an *Array*?

• Each node has either two children and one data element or three children and two data elements. • It is a collection of linked data structures called nodes. • There are no cycles (circular references) in the structure.

Select all of the statements that are true regarding the structure of a *2-3 Tree*. • The key of any node has a value <= all key values in its sub-trees • Each node has either two children and one data element or three children and two data elements. • It uses a hash function to compute an index into an array of buckets or slots, from which the desired value can be found or stored. • The underlying structure is often a heap. • The keys are always stored to satisfy the Min Heap property. • All of the elements are located contiguously in memory. • Its edges each include a weight value. • It is a collection of linked data structures called nodes. • There are no cycles (circular references) in the structure.

• Each node contains a pair of pointers (or references) to two other nodes. • The heights of the two child sub-trees of any node can differ by at most one. • There are no cycles (circular references) in the structure.

Select all of the statements that are true regarding the structure of a *AVL Tree*. • Each node contains a pair of pointers (or references) to two other nodes. • Its edges each include a weight value. • Each node has either two children and one data element or three children and two data elements. • The heights of the two child sub-trees of any node can differ by at most one. • It has a fixed size. • The last node in the sequence contains a pointer (or reference) to the first node in the sequence. • The values are stored and removed to satisfy first-in-first-out (FIFO) access property. • The keys are always stored to satisfy the Max Heap property. • There are no cycles (circular references) in the structure.

• There are no cycles (circular references) in the structure. • It is a collection of linked data structures called nodes. • The key at the root node has the maximum key value among all nodes.

Select all of the statements that are true regarding the structure of a *Binary Max Heap*. • There are no cycles (circular references) in the structure. • It has a fixed size. • The values are stored and removed to satisfy last-in-first-out (LIFO) access property. • Each node has either two children and one data element or three children and two data elements. • It is a collection of linked data structures called nodes. • All of the elements are located contiguously in memory. • Its edges are one-directional. • It supports direct access by index. • The key at the root node has the maximum key value among all nodes.

• The key at the root node has the minimum key value among all nodes. • There are no cycles (circular references) in the structure. • Each node contains a pair of pointers (or references) to two other nodes.

Select all of the statements that are true regarding the structure of a *Binary Min Heap*. • The values are stored and removed to satisfy the property that an element with high priority is served before an element with low priority. • The key at the root node has the minimum key value among all nodes. • The values are stored and removed to satisfy first-in-first-out (FIFO) access property. • There are no cycles (circular references) in the structure. • It has a fixed size. • Each node contains a pair of pointers (or references) to two other nodes. • The keys are always stored to satisfy the Binary Search Tree (BST) property. • It uses a hash function to compute an index into an array of buckets or slots, from which the desired value can be found or stored. • The heights of the two child sub-trees of any node can differ by at most one.

• It is a collection of linked data structures called nodes. • If y is a node in the right subtree of node x, then y.key >= x.key. • The keys are always stored to satisfy the Binary Search Tree (BST) property.

Select all of the statements that are true regarding the structure of a *Binary Search Tree (BST)*. • The values are stored and removed to satisfy the property that an element with high priority is served before an element with low priority. • It has a fixed size. • The key at the root node has the maximum key value among all nodes. • It is a collection of linked data structures called nodes. • The heights of the two child sub-trees of any node can differ by at most one. • If y is a node in the right subtree of node x, then y.key >= x.key. • The keys are always stored to satisfy the Binary Search Tree (BST) property. • Each node has either two children and one data element or three children and two data elements. • Its edges each include a weight value.

• Each node contains a pair of pointers (or references) to two other nodes. • It is a collection of linked data structures called nodes. • Each node contains a piece of data called a key.

Select all of the statements that are true regarding the structure of a *Binary Tree*. • If y is a node in the right subtree of node x, then y.key >= x.key. • The values are stored and removed to satisfy first-in-first-out (FIFO) access property. • It supports direct access by index. • Each node contains a pair of pointers (or references) to two other nodes. • Its edges each include a weight value. • It is a collection of linked data structures called nodes. • The key of any node has a value >= all key values in its sub-trees • Each node contains a piece of data called a key. • The key at the root node has the minimum key value among all nodes.

• It has a variable size. • It is a linear ordered collection of linked data structures called nodes. • The last node in the sequence contains a pointer (or reference) to the first node in the sequence.

Select all of the statements that are true regarding the structure of a *Circularly Linked List*. • The key at the root node has the maximum key value among all nodes. • The keys are always stored to satisfy the Binary Search Tree (BST) property. • It has a fixed size. • It has a variable size. • It is a linear ordered collection of linked data structures called nodes. • The last node in the sequence contains a pointer (or reference) to the first node in the sequence. • Each node has an extra bit of data that is used to ensure the structure remains approximately balanced during insertions and deletions. • The values are stored and removed to satisfy the property that an element with high priority is served before an element with low priority. • The values are stored and removed to satisfy last-in-first-out (LIFO) access property.

• It is a collection of nodes called vertices. • Its edges are one-directional. • It includes a set of edges that connect pairs of nodes.

Select all of the statements that are true regarding the structure of a *Directed Graph*. • Each node has an extra bit of data that is used to ensure the structure remains approximately balanced during insertions and deletions. • It is a collection of nodes called vertices. • The keys are always stored to satisfy the Binary Search Tree (BST) property. • The key of any node has a value <= all key values in its sub-trees • The underlying structure is often a heap. • Its edges are one-directional. • It uses a hash function to compute an index into an array of buckets or slots, from which the desired value can be found or stored. • The keys are always stored to satisfy the Min Heap property. • It includes a set of edges that connect pairs of nodes.

• Each node contains a pair of pointers or references to two other nodes. • It is a linear ordered collection of linked data structures called nodes. • It has a variable size.

Select all of the statements that are true regarding the structure of a *Doubly Linked List*. • It has a fixed size. • Each node has an extra bit of data that is used to ensure the structure remains approximately balanced during insertions and deletions. • All of the elements are located contiguously in memory. • Each node contains a pair of pointers or references to two other nodes. • Each value has an associated "priority" value. • The keys are always stored to satisfy the Min Heap property. • It is a linear ordered collection of linked data structures called nodes. • It has a variable size. • The keys are always stored to satisfy the Max Heap property.

• It is a collection of nodes called vertices. • There may be cycles (circular references) in the structure. • It includes a set of edges that connect pairs of nodes.

Select all of the statements that are true regarding the structure of a *Graph*. • It is a collection of nodes called vertices. • The key of any node has a value <= all key values in its sub-trees • Each node has an extra bit of data that is used to ensure the structure remains approximately balanced during insertions and deletions. • The keys are always stored to satisfy the Binary Search Tree (BST) property. • The last node in the sequence contains a pointer (or reference) to the first node in the sequence. • There may be cycles (circular references) in the structure. • It includes a set of edges that connect pairs of nodes. • Its edges each include a weight value. • The values are stored and removed to satisfy first-in-first-out (FIFO) access property.

• It is a collection of values mapped to keys. • The underlying data structure is often an array. • It uses a hash function to compute an index into an array of buckets or slots, from which the desired value can be found or stored.

Select all of the statements that are true regarding the structure of a *Hash Table*. • If y is a node in the right subtree of node x, then y.key >= x.key. • It is a collection of values mapped to keys. • All of the elements are located contiguously in memory. • The underlying data structure is often an array. • It uses a hash function to compute an index into an array of buckets or slots, from which the desired value can be found or stored. • It supports direct access by index. • The key at the root node has the minimum key value among all nodes. • The keys are always stored to satisfy the Min Heap property. • The last node in the sequence contains a pointer (or reference) to the first node in the sequence.

• Each node contains a piece of data called a key. • Each node contains a pointer or reference to another node. • It is a linear ordered collection of linked data structures called nodes.

Select all of the statements that are true regarding the structure of a *Linked List*. • The values are stored and removed to satisfy the property that an element with high priority is served before an element with low priority. • Each node contains a piece of data called a key. • Its edges each include a weight value. • The keys are always stored to satisfy the Min Heap property. • Each node contains a pointer or reference to another node. • It is a linear ordered collection of linked data structures called nodes. • Each value has an associated "priority" value. • The keys are always stored to satisfy the Binary Search Tree (BST) property. • Each node contains a pair of pointers (or references) to two other nodes.

• It is a linear ordered collection of values. • The values are stored and removed to satisfy the property that an element with high priority is served before an element with low priority. • The underlying structure is often a heap.

Select all of the statements that are true regarding the structure of a *Priority Queue*. • The values are stored and removed to satisfy last-in-first-out (LIFO) access property. • The key of any node has a value >= all key values in its sub-trees • It is a linear ordered collection of values. • If y is a node in the left subtree of node x, then y.key <= x.key. • It has a fixed size. • Each node has an extra bit of data that is used to ensure the structure remains approximately balanced during insertions and deletions. • The values are stored and removed to satisfy the property that an element with high priority is served before an element with low priority. • The underlying structure is often a heap. • Each node has either two children and one data element or three children and two data elements.

• It is a linear ordered collection of values. • The underlying structure is often an array or a linked list. • The values are stored and removed to satisfy first-in-first-out (FIFO) access property.

Select all of the statements that are true regarding the structure of a *Queue*. • If y is a node in the left subtree of node x, then y.key <= x.key. • It is a linear ordered collection of values. • The underlying structure is often an array or a linked list. • The values are stored and removed to satisfy first-in-first-out (FIFO) access property. • The keys are always stored to satisfy the Min Heap property. • If y is a node in the right subtree of node x, then y.key >= x.key. • Each node has either two children and one data element or three children and two data elements. • The heights of the two child sub-trees of any node can differ by at most one. • Each value has an associated "priority" value.

• There are no cycles (circular references) in the structure. • Each node contains a piece of data called a key. • Each node has an extra bit of data that is used to ensure the structure remains approximately balanced during insertions and deletions.

Select all of the statements that are true regarding the structure of a *Red-Black Tree*. • It supports direct access by index. • The values are stored and removed to satisfy the property that an element with high priority is served before an element with low priority. • There are no cycles (circular references) in the structure. • The keys are always stored to satisfy the Min Heap property. • Each node contains a piece of data called a key. • Each node has an extra bit of data that is used to ensure the structure remains approximately balanced during insertions and deletions. • The key at the root node has the minimum key value among all nodes. • The values are stored and removed to satisfy last-in-first-out (LIFO) access property. • The last node in the sequence contains a pointer (or reference) to the first node in the sequence.

• It is a linear ordered collection of linked data structures called nodes. • Each node contains a piece of data called a key. • It has a variable size.

Select all of the statements that are true regarding the structure of a *Singly Linked List*. • It has a fixed size. • The values are stored and removed to satisfy first-in-first-out (FIFO) access property. • The key at the root node has the maximum key value among all nodes. • All of the elements are located contiguously in memory. • Each node contains a pair of pointers (or references) to two other nodes. • It is a linear ordered collection of linked data structures called nodes. • Each node contains a piece of data called a key. • It has a variable size. • Its edges each include a weight value.

• Each node contains a pair of pointers or references to two other nodes. • Each node contains a piece of data called a key. • If y is a node in the left subtree of node x, then y.key <= x.key.

Select all of the statements that are true regarding the structure of a *Splay Tree*. • All of the elements are located contiguously in memory. • The values are stored and removed to satisfy last-in-first-out (LIFO) access property. • Each node contains a pair of pointers or references to two other nodes. • Each node contains a piece of data called a key. • It has a fixed size. • The last node in the sequence contains a pointer (or reference) to the first node in the sequence. • The key of any node has a value <= all key values in its sub-trees • It uses a hash function to compute an index into an array of buckets or slots, from which the desired value can be found or stored. • If y is a node in the left subtree of node x, then y.key <= x.key.

• The underlying structure is often an array or a linked list. • It is a linear ordered collection of values. • The values are stored and removed to satisfy last-in-first-out (LIFO) access property.

Select all of the statements that are true regarding the structure of a *Stack*. • It supports direct access by index. • The underlying structure is often an array or a linked list. • The values are stored and removed to satisfy the property that an element with high priority is served before an element with low priority. • The key at the root node has the minimum key value among all nodes. • The keys are always stored to satisfy the Min Heap property. • The keys are always stored to satisfy the Max Heap property. • It is a linear ordered collection of values. • The underlying structure is often a heap. • The values are stored and removed to satisfy last-in-first-out (LIFO) access property.

• Its edges each include a weight value. • It includes a set of edges that connect pairs of nodes. • It is a collection of nodes called vertices.

Select all of the statements that are true regarding the structure of a *Weighted Graph*. • The key at the root node has the minimum key value among all nodes. • It supports direct access by index. • Its edges each include a weight value. • All of the elements are located contiguously in memory. • It includes a set of edges that connect pairs of nodes. • The key of any node has a value <= all key values in its sub-trees • The values are stored and removed to satisfy first-in-first-out (FIFO) access property. • It is a collection of nodes called vertices. • The key of any node has a value >= all key values in its sub-trees

• It is a linear ordered collection of values called elements. • It has a variable size. • It supports direct access by index.

Select all of the statements that are true regarding the structure of an *Array List*. • The key of any node has a value >= all key values in its sub-trees • It is a linear ordered collection of values called elements. • The underlying structure is often a heap. • It has a fixed size. • The key at the root node has the minimum key value among all nodes. • It has a variable size. • It includes a set of edges that connect pairs of nodes. • It supports direct access by index. • Each node contains a pair of pointers (or references) to two other nodes.

• All of the elements are located contiguously in memory. • It supports direct access by index. • All of the elements are of the same type.

Select all of the statements that are true regarding the structure of an *Array*. • It has a variable size. • Each value has an associated "priority" value. • The values are stored and removed to satisfy last-in-first-out (LIFO) access property. • All of the elements are located contiguously in memory. • It supports direct access by index. • Each node contains a pair of pointers or references to two other nodes. • The last node in the sequence contains a pointer (or reference) to the first node in the sequence. • The values are stored and removed to satisfy the property that an element with high priority is served before an element with low priority. • All of the elements are of the same type.

Binary Min Heap

The following properties best describe which data structure? Choose the best answer. • It is a collection of linked data structures called nodes. • Each node contains a piece of data called a key. • Each node contains a pair of pointers (or references) to two other nodes. • There are no cycles (circular references) in the structure. • The key at the root node has the minimum key value among all nodes. • The key of any node has a value <= all key values in its sub-trees • If y is a node in the right subtree of node x, then y.key >= x.key.

Graph

The following properties best describe which data structure? Choose the best answer. • It is a collection of nodes called vertices. • It includes a set of edges that connect pairs of nodes. • There may be cycles (circular references) in the structure.

Doubly Linked List

The following properties best describe which data structure? Choose the best answer. • It is a linear ordered collection of linked data structures called nodes. • It has a variable size. • Each node contains a piece of data called a key. • Each node contains a pair of pointers or references to two other nodes.

Circularly Linked List

The following properties best describe which data structure? Choose the best answer. • It is a linear ordered collection of linked data structures called nodes. • It has a variable size. • Each node contains a piece of data called a key. • Each node contains a pointer or reference to another node. • The last node in the sequence contains a pointer (or reference) to the first node in the sequence.

Array List

The following properties best describe which data structure? Choose the best answer. • It is a linear ordered collection of values called elements. • It has a variable size. • All of the elements are of the same type. • All of the elements are located contiguously in memory. • It supports direct access by index.


Kaugnay na mga set ng pag-aaral

CHAPTER 3: ARE WE REALLY WHAT WE EAT?

View Set

Principles of Macroeconomics: Chapter 1 and 2

View Set

Chapter 46: Management of Patients With Oral and Esophageal Disorders

View Set

Fractions on a Number Line and Shapes

View Set

MUSIC CH 49 DEBUSSY, Music Test 2

View Set

A&P Mastering Chapter 11 & Video Assignments

View Set

Marketing Research Ch 6 Traditional survey research

View Set