WGU C949 v5 - Data Structures and Algorithms I C949 WGU C949 - Data Structures and Algorithms Pre-Assessment QUESTIONS WITH CORRECT ANSWERS

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/394

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 3:29 PM on 6/19/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

395 Terms

1
New cards

data structure

A data structure is a way of organizing, storing, and performing operations on data.

2
New cards

record

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

3
New cards

array

An array is a data structure that stores an ordered collection of elements, where each element is directly accessible by a positional index.

4
New cards

linked list

A linked list is a data structure that stores an ordered list of items in nodes, where each node stores data and has a reference to the next node.

5
New cards

binary tree

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

6
New cards

hash table

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

7
New cards

max-heap

A 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.

8
New cards

min-heap

A min-heap is a tree that maintains the simple property that a node's key is less than or equal to the node's childrens' keys.

9
New cards

graph

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

10
New cards

vertex

A vertex represents an item in a graph.

11
New cards

edge

An edge represents a connection between two vertices in a graph.

12
New cards

algorithm

An algorithm describes a sequence of steps to solve a computational problem or perform a calculation.

13
New cards

computational problem

A computational problem specifies an input, a question about the input that can be answered using a computer, and the desired output.

14
New cards

NP-complete

NP-complete problems are a set of problems for which no known efficient algorithm exists.

15
New cards

abstract data type / ADT

An abstract data type (ADT) is a data type described by predefined user operations, such as "insert data at rear," without indicating how each operation is implemented.

16
New cards

list

A list is an ADT for holding ordered data.

17
New cards

dynamic array

A dynamic array is an ADT for holding ordered data and allowing indexed access.

18
New cards

stack

A stack is an ADT in which items are only inserted on or removed from the top of a stack.

19
New cards

queue

A queue is an ADT in which items are inserted at the end of the queue and removed from the front of the queue.

20
New cards

deque

A deque (pronounced "deck" and short for double-ended queue) is an ADT in which items can be inserted and removed at both the front and back.

21
New cards

bag

A bag is an ADT for storing items in which the order does not matter and duplicate items are allowed.

22
New cards

set

A set is an ADT for a collection of distinct items.

23
New cards

priority queue

A priority queue is a queue where each item has a priority, and items with higher priority are closer to the front of the queue than items with lower priority.

24
New cards

dictionary

A dictionary is an ADT that associates (or maps) keys with values.

25
New cards

abstraction

Abstraction means to have a user interact with an item at a high-level, with lower-level internal details hidden from the user.

26
New cards

compression

Given data represented as some quantity of bits, compression transforms the data to use fewer bits.

27
New cards

Huffman coding

Huffman coding is a common compression technique that assigns fewer bits to frequent items, using a binary tree.

28
New cards

heuristic

Heuristic: A technique that willingly accepts a non-optimal or less accurate solution in order to improve execution speed.

29
New cards

heuristic algorithm

A heuristic algorithm is an algorithm that quickly determines a near optimal or approximate solution.

30
New cards

0-1 knapsack problem

0-1 knapsack problem: The knapsack problem with the quantity of each item limited to 1.

31
New cards

self-adjusting heuristic

A self-adjusting heuristic is an algorithm that modifies a data structure based on how that data structure is used.

32
New cards

greedy algorithm

A greedy algorithm is an algorithm that, when presented with a list of options, chooses the option that is optimal at that point in time.

33
New cards

fractional knapsack problem

The fractional knapsack problem is the knapsack problem with the potential to take each item a fractional number of times, provided the fraction is in the range [0.0, 1.0].

34
New cards

activity selection problem

The activity selection problem is a problem where one or more activities are available, each with a start and finish time, and the goal is to build the largest possible set of activities without time conflicts.

35
New cards

dynamic programming

Dynamic programming is a problem solving technique that splits a problem into smaller subproblems, computes and stores solutions to subproblems in memory, and then uses the stored solutions to solve the larger problem.

36
New cards

longest common substring

The longest common substring algorithm takes 2 strings as input and determines the longest substring that exists in both strings.

37
New cards

list

A list is a common ADT for holding ordered data, having operations like append a data item, remove a data item, check if a data item exists, and print the list.

38
New cards

singly-linked list

A singly-linked list is a data structure for implementing a list ADT, where each node has data and a reference to the next node.

39
New cards

head / tail

A singly-linked list's first node is called the head, and the last node the tail.

40
New cards

positional list

A singly-linked list is a type of positional list: A list where elements contain references to the next and/or previous elements in the list.

41
New cards

append

The singly-linked list append operation inserts a new node after the list's tail node.

42
New cards

prepend

Given a new node, the prepend operation for a singly-linked list inserts the new node before the list's head node.

43
New cards

search

Given a data value, a linked list search operation returns the first node whose data equals that data value, or None if no such node exists.

44
New cards

insert-node-after

Given a new node, the insert-node-after operation for a singly-linked list inserts the new node after a provided existing list node.

45
New cards

remove-node-after

Given a specified existing node in a singly-linked list, the remove-node-after operation removes the node after the specified list node.

46
New cards

doubly-linked list

A doubly-linked list is a data structure for implementing a list ADT, where each node has data, a reference to the next node, and a reference to the previous node.

47
New cards

positional list

A doubly-linked list is a type of positional list: A list where elements contain references to the next and/or previous elements in the list.

48
New cards

append

Given a new node, the append operation for a doubly-linked list inserts the new node after the list's tail node.

49
New cards

prepend

Given a new node, the prepend operation of a doubly-linked list inserts the new node before the list's head node and assigns the head attribute with the new node.

50
New cards

search

Given a data value, a linked list search operation returns the first node whose data equals that data value, or None if no such node exists.

51
New cards

insert-node-after

Given a new node, the insert-node-after operation for a doubly-linked list inserts the new node after a provided existing list node.

52
New cards

remove-node

The remove-node operation for a doubly-linked list removes a provided existing list node.

53
New cards

circular linked list

A circular linked list is a linked list where the tail node's next attribute references the head of the list, instead of None.

54
New cards

list traversal

A list traversal algorithm visits all nodes in the list once and performs an operation on each node.

55
New cards

reverse traversal

A reverse traversal visits all nodes starting with the list's tail node and ending after visiting the list's head node.

56
New cards

dummy node / header node

A linked list implementation may use a dummy node (or header node): A node with an unused data member that always resides at the list head and cannot be removed.

57
New cards

array-based list

An array-based list is a list ADT implemented using an array.

58
New cards

append

Given a new element, the append operation for an array-based list of length X inserts the new element at the end of the list, or at index X.

59
New cards

prepend

The prepend operation for an array-based list inserts a new item at the start of the list.

60
New cards

insert-at

The insert-at operation for an array-based list inserts an item at a specified index.

61
New cards

search

Given an item, the search operation returns the index of the first equal list item, or -1 if not found.

62
New cards

remove-at

Given the index of an item in an array-based list, the remove-at operation removes the item at that index.

63
New cards

stack

A stack is an ADT representing a collection of items in which items are only inserted on or removed from the top.

64
New cards

push

The stack push operation inserts an item on the top of the stack.

65
New cards

pop

The stack pop operation removes and returns the item at the top of the stack.

66
New cards

last-in first-out / LIFO

A stack is referred to as a last-in first-out (LIFO) ADT.

67
New cards

unbounded stack

An unbounded stack is a stack with no upper limit on length.

68
New cards

bounded stack

A bounded stack is a stack with a length that does not exceed a maximum value.

69
New cards

full

A bounded stack with a length equal to the maximum length is said to be full.

70
New cards

queue

A queue is an ADT representing a collection of items in which items are inserted at the end and removed from the front.

71
New cards

enqueue

The queue enqueue operation inserts an item at the end of the queue.

72
New cards

dequeue

The queue dequeue operation removes and returns the item at the front of the queue.

73
New cards

first-in first-out / FIFO

A queue is referred to as a first-in first-out (FIFO) ADT.

74
New cards

bounded queue

A bounded queue is a queue with a length that does not exceed a specified maximum value.

75
New cards

full

A bounded queue with a length equal to the maximum length is said to be full.

76
New cards

unbounded queue

An unbounded queue is a queue with a length that can grow indefinitely.

77
New cards

deque

A deque (pronounced "deck" and short for double-ended queue) is an ADT in which items can be inserted and removed at both the front and back.

78
New cards

peek

A peek operation returns an item in the deque without removing the item.

79
New cards

Queue

A Queue class is defined in the queue module and can be imported with the from queue import Queue statement.

80
New cards

map / dictionary

A map (or dictionary) is an ADT that associates (or maps) keys with values.

81
New cards

insert

The map insert operation takes two parameters, a key and a value. If the key does not exist in the map, the key-value pair is inserted. If the key does exist, the value is updated.

82
New cards

get

The map get operation takes one parameter for the key and returns the associated value, or None if the key does not exist in the map.

83
New cards

hash code

The first problem is addressed with a hash code: a non-negative integer that attempts to uniquely identify a key.

84
New cards

hash function

A hash function is a function that computes a hash code for a given value.

85
New cards

hash table

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

86
New cards

bucket

Each hash table array element is called a bucket.

87
New cards

hash map

A hash map is an implementation of a map ADT using a hash table.

88
New cards

collision

A hash table collision occurs when two different keys map to the same bucket index.

89
New cards

Chaining

Chaining is a collision resolution technique where each bucket has a list of items (so bucket 6's list could have keys 86 and 16).

90
New cards

Open addressing

Open addressing is a collision resolution technique where collisions are resolved by looking for an empty bucket elsewhere in the table (so key 16 might be stored in bucket 7).

91
New cards

Chaining

Chaining handles hash table collisions by using a list for each bucket, where each list stores the items that map to that bucket.

92
New cards

linear probing

A hash table with linear probing handles a collision by starting at the key's mapped bucket, and then linearly searches subsequent buckets until an empty bucket is found.

93
New cards

empty-since-start

An empty-since-start bucket has been empty since the hash table was created.

94
New cards

empty-after-removal

An empty-after-removal bucket had an item removed that caused the bucket to now be empty.

95
New cards

quadratic probing

A hash table with quadratic probing handles a collision by starting at the key's mapped bucket, and then quadratically searches subsequent buckets until an empty bucket is found.

96
New cards

probing sequence

Iterating through sequential i values to obtain the desired index is called the probing sequence.

97
New cards

Double hashing

Double hashing is an open-addressing collision resolution technique that uses two different hash functions to compute bucket indices.

98
New cards

probing sequence

Iterating through sequential i values to obtain the desired table index is called the probing sequence.

99
New cards

resize

A hash table resize operation increases the number of buckets while preserving all existing items.

100
New cards

load factor

A hash table's load factor is the number of items in the hash table divided by the number of buckets.