Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
24 Cards in this Set
- Front
- Back
Polymorphism
|
Do Same things with different types
|
|
Algorithm
|
Step-by-step process for performing some task in a
finite amount of time. |
|
Data Structure
|
systematic way of organizing and accessing data
|
|
Stack
|
LIFO
DFS (not guaranteed but can be faster than BFS) |
|
Queue
|
FIFO
BFS(can be slower but guaranteed to find solution if one exists |
|
Array Stack
|
O(1) everything
takes up O(capacity) space -:Not sensitive to space needed |
|
Array Queue
|
O(1) everything
takes up O(capacity) space size=(capacity-front+rear)%capacity need an empty slot otherwise full and empty will be same -:Not sensitive to space needed enqueue:r=r+1%capacity dequeue:f=f+1%capacity |
|
Array Stack
|
O(1) everything
takes up O(capacity) space -:Not sensitive to space needed |
|
Array Queue
|
O(1) everything
takes up O(capacity) space size=(capacity-front+rear)%capacity need an empty slot otherwise full and empty will be same -:Not sensitive to space needed enqueue:r=r+1%capacity dequeue:f=f+1%capacity |
|
Array Stack
|
O(1) everything
takes up O(capacity) space -:Not sensitive to space needed |
|
Array Queue
|
O(1) everything
takes up O(capacity) space size=(capacity-front+rear)%capacity need an empty slot otherwise full and empty will be same -:Not sensitive to space needed enqueue:r=r+1%capacity dequeue:f=f+1%capacity |
|
Linked Tree vs Array Tree
|
take about same time to work
linked tree is faster |
|
Preorder Traversal
|
LRootR
|
|
Postorder
|
LRRoot
|
|
Inorder
|
LrootR
|
|
loadfactor
|
O(ceil(n/N))
n=entries N=capacitiy load factor =lambda (should be less than 1) |
|
Spanning subrgraph
|
contains all the vertices of t
|
|
Forest
|
Disjoint union of trees
|
|
Edgelist
|
O(n+m)
Dictionary of edges point to vertices findign a vertex sucked balls |
|
Adjacency matrix
|
O(n^2)
|
|
Adjacency list
|
O(n+m)
|
|
DFS (graphs)
|
O(m_s+n_s) starting at s
|
|
BFS (GRAPHS)
|
O(n+m)
better shortest path and undirected graph makes spanning tree in direct |
|
Dijkstra's Algorithm
|
O(n^2logn)
|