Shared Flashcard Set

Details

Data Structures & Algorithms I
Terms only
94
Computer Science
Undergraduate 2
12/12/2012

Additional Computer Science Flashcards

 


 

Cards

Term
Σi
Definition
N(N+1)
_________
2
Term
Σi^2
Definition
N(N+1)(N-1)
______________
6
Term
Σi^3
Definition
[N(N+1)/2]^2
Term
Σ2^i
Definition
2^N+1 -1
Term
Three Core Elements by which to assess a Data Structure
Definition
Speed, Efficiency, Flexibility
Term
Does 2^10 = 1024 ?
Definition
Yes
Term
Does 2^20 = [2^10]*2?
Definition
No
Term
Does 2^20 = [2^10]*[2^10]?
Definition
Yes
Term
At which x does 2^x does an algorithm's processes become non-feasible by modern computing?
Definition
2^80
Term
Name of log2N algorithm class
Definition
Logarithmic
Term
Name of N algorithm class
Definition
LINEAR
Term
Name of NlogN algorithm class
Definition
Linearithmic
Term
Name of N^2 algorithm class
Definition
Quadratic
Term
Name of N^3 algorithm class
Definition
Cubic
Term
Name of 2^N algorithm class
Definition
Exponential
Term
Name of N! algorithm class
Definition
Factorial
Term
Extreme best algorithm class
Definition
O(1) Algorithm Class
Term
Polynomial Time (GOOD/BAD)
Definition
GOOD
Term
Super Polynomial Time (GOOD/BAD)
Definition
BAD
Term
Big O refers to an algorithm's core growth being _______ than the growth of g
Definition
less than or equal to
Term
Big Sigma Notation to an algorithm's core growth being _______ than the growth of g
Definition
more than or equal to
Term
Big Theta notation refers to an algorithm's core growth being _________ than the growth of g
Definition
equal to
Term
DEFINE BIG O
Definition
We say that T(n) is O(g(n)) if there exists constants c>0 and n0 >= 0 such that T(n) <= c * g(n) for all N >= n0
Term
DEFINE BIG O
Definition
We say that T(n) is O(g(n)) if there exists constants c>0 and n0 >= 0 such that T(n) <= c * g(n) for all N >= n0
Term
DEFINE BIG O
Definition
We say that T(n) is O(g(n)) if there exists constants c>0 and n0 >= 0 such that T(n) <= c * g(n) for all N >= n0
Term
DEFINE BIG O
Definition
We say that T(n) is O(g(n)) if there exists constants c>0 and n0 >= 0 such that T(n) <= c * g(n) for all N >= n0
Term
DEFINE BIG O
Definition
We say that T(n) is O(g(n)) if there exists constants c>0 and n0 >= 0 such that T(n) <= c * g(n) for all N >= n0
Term
DEFINE BIG O
Definition
We say that T(n) is O(g(n)) if there exists constants c>0 and n0 >= 0 such that T(n) <= c * g(n) for all N >= n0
Term
DEFINE BIG O
Definition
We say that T(n) is O(g(n)) if there exists constants c>0 and n0 >= 0 such that T(n) <= c * g(n) for all N >= n0
Term
DEFINE BIG O
Definition
We say that T(n) is O(g(n)) if there exists constants c>0 and n0 >= 0 such that T(n) <= c * g(n) for all N >= n0
Term
DEFINE BIG O
Definition
We say that T(n) is O(g(n)) if there exists constants c>0 and n0 >= 0 such that T(n) <= c * g(n) for all N >= n0
Term
DEFINE BIG O
Definition
We say that T(n) is O(g(n)) if there exists constants c>0 and n0 >= 0 such that T(n) <= c * g(n) for all N >= n0
Term
DEFINE BIG O
Definition
We say that T(n) is O(g(n)) if there exists constants c>0 and n0 >= 0 such that T(n) <= c * g(n) for all N >= n0
Term
DEFINE BIG O
Definition
We say that T(n) is O(g(n)) if there exists constants c>0 and n0 >= 0 such that T(n) <= c * g(n) for all N >= n0
Term
DEFINE BIG O
Definition
We say that T(n) is O(g(n)) if there exists constants c>0 and n0 >= 0 such that T(n) <= c * g(n) for all N >= n0
Term
Big O complexity of SEARCH in UNSORTED ARRAYS of size N
Definition
O(N)
Term
Big O complexity of INSERT in UNSORTED ARRAYS of size N
Definition
O(1)
Term
Big O complexity of DELETE in UNSORTED ARRAYS of size N
Definition
O(N)
Term
Big O complexity of DELETE in SORTED ARRAYS of size N
Definition
O(N)
Term
Big O complexity of INSERT in SORTED ARRAYS of size N
Definition
O(N)
Term
Big O complexity of SEARCH in SORTED ARRAYS
Definition
log2N
Term
Selection Sort
Definition
Go through entire array, select smallest value, insert it in to smallest space so far (starts at arr[0] ).

Go through entire array, select second smallest value, swap in to second smallest index arr[1]

Continue until no swaps occur.
Term
Selection Sort
Definition
Go through entire array, select smallest value, insert it in to smallest space so far (starts at arr[0] ).

Go through entire array, select second smallest value, swap in to second smallest index arr[1]

Continue until no swaps occur.
Term
Selection Sort
Definition
Go through entire array, select smallest value, insert it in to smallest space so far (starts at arr[0] ).

Go through entire array, select second smallest value, swap in to second smallest index arr[1]

Continue until no swaps occur.
Term
Selection Sort
Definition
Go through entire array, select smallest value, insert it in to smallest space so far (starts at arr[0] ).

Go through entire array, select second smallest value, swap in to second smallest index arr[1]

Continue until no swaps occur.
Term
Bubble Sort
Definition
Goes through entire array comparing arr[current] to arr[prior] repeatedly until no swaps occur.
Term
Bubble Sort
Definition
Goes through entire array comparing arr[current] to arr[prior] repeatedly until no swaps occur.
Term
Bubble Sort
Definition
Goes through entire array comparing arr[current] to arr[prior] repeatedly until no swaps occur.
Term
Bubble Sort
Definition
Goes through entire array comparing arr[current] to arr[prior] repeatedly until no swaps occur.
Term
Bubble Sort
Definition
Goes through entire array comparing arr[current] to arr[prior] repeatedly until no swaps occur.
Term
Bubble Sort
Definition
Goes through entire array comparing arr[current] to arr[prior] repeatedly until no swaps occur.
Term
Insertion Sort
Definition
Creates subarrays that are already sorted. Takes in arr[subarr+1] and compares it to arr[subarr], then places it in its position within the subarray. Excels at sorting on-the-fly.
Term
Insertion Sort
Definition
Creates subarrays that are already sorted. Takes in arr[subarr+1] and compares it to arr[subarr], then places it in its position within the subarray. Excels at sorting on-the-fly.
Term
Insertion Sort
Definition
Creates subarrays that are already sorted. Takes in arr[subarr+1] and compares it to arr[subarr], then places it in its position within the subarray. Excels at sorting on-the-fly.
Term
Insertion Sort
Definition
Creates subarrays that are already sorted. Takes in arr[subarr+1] and compares it to arr[subarr], then places it in its position within the subarray. Excels at sorting on-the-fly.
Term
Insertion Sort
Definition
Creates subarrays that are already sorted. Takes in arr[subarr+1] and compares it to arr[subarr], then places it in its position within the subarray. Excels at sorting on-the-fly.
Term
Insertion Sort
Definition
Creates subarrays that are already sorted. Takes in arr[subarr+1] and compares it to arr[subarr], then places it in its position within the subarray. Excels at sorting on-the-fly.
Term
Efficiency of SEARCH, DELETE, AND INSERT in STACKS and QUEUES
Definition
O(1)
Term
ABSTRACT DATA TYPES STUDIED
Definition
Stacks, Queues, Trees, Graphs
Term
Tree Traversals: In Order Traversal
Definition
Recurse Left;
Process;
Recurse Right
Term
Tree Traversals: Pre-Order Traversal
Definition
Process;
Recurse Left;
Recurse Right;
Term
Tree Traversals: Post-Order Traversal
Definition
Recurse Left;
Recurse Right;
Process;
Term
Tree Traversals: Level-Order
Definition
Traverse with a stack,

Process N;
Add left child to stack;
Add right child to stack;
Add grandchildren to stack;
Term
Reference Variable
Definition
A Variable whose type is a class, just a reference, always a fixed size of 32b
Term
Fractal
Definition
a geometric shape with self similarity on infinitely many scales
Term
Recurrent Relation
Definition
The complexity relationship of a recursive algorithm.
Term
Checked Exception
Definition
direct subclasses of exception, usually indicate something that can't be controlled
Term
Unchecked Exception
Definition
direct subclasses of runtime exception. Doesn't have to be dealt with.
Term
Tree
Definition
A non-linear data structure that represents a hierarchical relationship
Term
Trees: Vertices
Definition
The "nodes" of a tree
Term
Tree: Level
Definition
The "level" at which nodes may be at. Root = Level 0
Term
Trees: Every child has exactly _____ parent, except root
Definition
One
Term
The descendants of a node are its ____________
Definition
Children
Term
Tree: Subtree rooted at node X consists of X and
Definition
all of its descendants including the edges that connect them
Term
Tree: If X has no children, then the X subtree consists of_____
Definition
x alone
Term
Tree: A childless node is called a ______
Definition
leaf
Term
Tree: A non-leaf node is called an _______
Definition
interior node
Term
Tree: An empty tree has no_____
Definition
Nodes
Term
Trees: Are cycles allowed?
Definition
No. A child may not also be a parent, or have a lower level in the tree.
Term
Trees: A binary tree node has at most ________ descendants.
Definition
two
Term
Trees: Perfect binary trees
Definition
has as many nodes as possible for its height
Term
Trees: Full binary trees
Definition
Every interior node has two children
Term
Graphs: Vertex
Definition
similar to tree "nodes"
Term
Graphs: A pair of vertices in set notation forms an______
Definition
edge
Term
Graphs: Adjacent Vertices are ________
Definition
joined by an edge
Term
Graphs: A path is a set of ______
Definition
a path from V to J is a sequence of vertices such that there is an edge from X1 to X1+1 for 1<= i <= k
Term
Graphs: Simple cycle
Definition
no repeated vertices except for initial and final vertices
Term
Graphs: Length of a path
Definition
# of edges traversed
Term
Graphs: The minimum length of a simple cycle is _____
Definition
2
Term
Graphs: a graph is connected if _______
Definition
there is a path from every vertex to every other vertex
Term
Graphs: a graph is not connected if ______
Definition
there exist different 'pieces' of the graph
Term
Graphs: A graph is complete if _______
Definition
all vertices have all possible edges
Term
Graphs: An adjacency matrix is _______
Definition
sometimes rep'd as a square 2D array, V in length, with 1's and 0's if connections exist. Mirrored about the middle.
Term
Graphs: The degree of a node is ________
Definition
the number of neighbors it has
Supporting users have an ad free experience!