Docsity

COSC 2436 MIDTERM VERIFIED STUDY GUIDE, Exams of Social Sciences

Toggle sidebar
bg1
COSC 2436 MIDTERM VERIFIED STUDY GUIDE
data structure - Answers - an organization of the data in a way so it can used efficiently
it is implemented an ADT
things to consider when selecting a data structure - Answers - number of data item
number of operations
processing speed
efficiency
two parts of data structure - Answers - interface (what the data structure can do)
implementation (actual definition of how the interface will do what we expect it to)
performance of data structure - Answers - implementation of the interface
(correctness)
run time of operation (time complexities)
memory usage (space complexities)
types of running time - Answers - worst-case - operation do not take longer than f(n)
amortized - cost of typical operation at most f(n)
expected - actual runtime
Big O - Answers - used to describe an algorithm's performance/execution time as input
grows to infinity
O(1) - Answers - constant time
O(N) - Answers - Linear time
O(n^2) - Answers - quadratic time
O(n^c) - Answers - polynomial time
O(c^n) - Answers - exponential time
O(log n) - Answers - logarithmic
List ADT - Answers - underlying data structure has no impact on the program's
execution.
List ADT implementation - Answers - array - constant time
linked list - linear time
Stack ADT - Answers - Collection of data together with operations
pf3

Partial preview of the text

Download COSC 2436 MIDTERM VERIFIED STUDY GUIDE and more Exams Social Sciences in PDF only on Docsity!

COSC 2436 MIDTERM VERIFIED STUDY GUIDE

data structure - Answers - an organization of the data in a way so it can used efficiently it is implemented an ADT things to consider when selecting a data structure - Answers - number of data item number of operations processing speed efficiency two parts of data structure - Answers - interface (what the data structure can do) implementation (actual definition of how the interface will do what we expect it to) performance of data structure - Answers - implementation of the interface (correctness) run time of operation (time complexities) memory usage (space complexities) types of running time - Answers - worst-case - operation do not take longer than f(n) amortized - cost of typical operation at most f(n) expected - actual runtime Big O - Answers - used to describe an algorithm's performance/execution time as input grows to infinity O(1) - Answers - constant time O(N) - Answers - Linear time O(n^2) - Answers - quadratic time O(n^c) - Answers - polynomial time O(c^n) - Answers - exponential time O(log n) - Answers - logarithmic List ADT - Answers - underlying data structure has no impact on the program's execution. List ADT implementation - Answers - array - constant time linked list - linear time Stack ADT - Answers - Collection of data together with operations

The Stack ADT may be implemented with - Answers - singly linked list array vector Stack ADT operations - Answers - push pop top isEmpty Stack ADT applications - Answers - recursion balancing symbols evaluation of expression undo/redo function in editior backtracking algorithms reversing input Queue ADT - Answers - is where items are added to the rear, but items are removed from the front. this means that items are removed in the order they were added Queue ADT implementation - Answers - singly linked list array Queue ADT application - Answers - print queue data structure on a file-serve queuing theory graph algorithms utilize queues for runtime efficiency Why use a tree? - Answers - constant time on insertion, deletion, and search tree can stored large data Binary Tree - Answers - a tree in which each node has at most two children. binary search tree - Answers - A binary tree with the property that for all parent nodes, the left subtree contains only values less than the parent, and the right subtree contains only values greater than the parent. AVL Tree - Answers - a self-balancing sorted binary tree, in which the heights of subtrees differ by at most 1. Splay Tree - Answers - a self-balancing binary tree that places recently accessed elements near the top of the tree for fast access. Hash Table - Answers - a table that associates key values with data by use of a hash function.