Data Structures Exam 2
Using the correct data structures can support
-Searching large data sets -varying processor speeds -multiple search requests (all of the above)
Which is true of binary search trees?
-The left child is always lesser than its parent -the right child is always greater than its parent -the left and right sub-trees must follow BST rules (all of the above)
Which is true of a doubly linked list?
-can navigate in both directions -requires more space than a singly linked list -insertion and deletion of a node takes longer (all of the above)
In this Binary Search Tree, every node maintains extra information known as a balance factor
AVL Tree
In this tree data structure, the key in each node must be greater than or equal to any key stored in the left sub-tree, and less than or equal to any key stored in the right sub-tree.
Binary Search Tree
This algorithm is used for traversing or searching tree data structures; starts at the tree root and explores all of the neighbor nodes at the present depth before moving on to the nodes at the next depth level.
Breadth-first search
Operations are performed FIFO; the last position is connect back to the first to make a circle
Circular Queue
How does a conventional queue differ from a priority queue
Conventional queues are FIFO meanwhile in priority queue values come out in order by priority
If the elements "A", "B", "C" and "D" are placed in a stack and are deleted one at a time, what is the order of removal
DCBA Stack follows LIFO(Last In First Out).
In Linked List implementations, what information is found in a
Data & reference to the next node
Go as deep as possible down one path before backing up and trying a different one
Depth First Search
This searching algorithm (when applied to trees) starts at the root node and explores as far as possible along each branch before backtracking.
Depth first search
Linked lists are considered an example of ___________ type of memory allocation.
Dynamic
In a full binary tree
Each node is either a leaf or has exactly two child nodes
Practical implementations of the graph data structure
Graphs are used to represent many real-life applications: Graphs are used to represent networks. The networks may include paths in a city or telephone network or circuit network.
Comparison sorting algorithm used in association with the Binary Heap data structure
Heapsort
Each node contains one letter of a word; allows for quick lookup used in word auto-complete
Language Trie
A linear collection of data elements, whose order is not given by their physical placement in memory; instead each element points to the next.
Linked List
What would be the asymptotic worst case (Big O) time complexity to insert an element in the singly linked list?
O(N)
For a singly linked list, which is the worst time complexity to find an element?
O(n)
The process of inserting an element in stack is called:
Push
A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as:
Queue
Print jobs & task scheduling in an OS are practical applications for this data structure
Queue
This programming technique calls itself one or more times until a specified condition, the base case, is met
Recursion
Each node of this binary tree has an extra bit which is interpreted as the color of the node
Red Black Tree
Given two points, what is the shortest path between them is an example of a...
Shortest path problem
A data structure often used to perform recursion
Stack
File systems & organizational charts are practical examples of this data structure
Tree
This data structure is a collection of entities called nodes; nodes are connected by edges
Tree
Types of data structures often used to organize hierarchical data.
Tree
The operation that removes an element from a queue:
dequeue
Characteristic of and types of linked lists
dynamic data structure, no random access, insertions and deletions are efficient; no shifting, sequential access is slow (elements not in contiguous memory locations)
In a linked list, the data items need to be stored contiguously in memory or on disk. True or False
false
In this tree data structure, the root node can either be the highest value or the minimum value. Often used for finding the min, max, median value in a collection of data.
heap
In a tree, this is the length of the longest path to a leaf
height
Breadth-first search (BFS) is also known as
level-order transversal
A characteristics of queues and stacks
limited access data structures, can be implemented using arrays or linked lists
In a linked list, each node contains a field to store data & a second field which is a
pointer to the next node
Stack operations
push(insert), pop(delete), display, initialize, isEmpty, isFull
This error occurs when trying to push more items into a stack that has reached its capacity
stack overflow
In a directed graph...
the edges have a direction associated with them
A root node is found in...
trees
Graphs are represented with/components of a graph
vertices and edges