132 final Flashcards
1
Q
TC
sorting w/o recursion
A
n2
2
Q
TC
searching a sorted array
A
log n
3
Q
TC
searching array
A
n
4
Q
TC
sorting recursively
A
nlogn
5
Q
TC
sort a tree
A
logn
6
Q
TC
search a tree
A
n
7
Q
why is bubblesort useful for smaller data sets?
A
bubblesort can be broken out of, it knows when it is sorted
8
Q
TC
bubblesort best time
A
n
9
Q
to remove from a linked list
A
x.next.prev = x.prev
10
Q
Index
left child =
A
(parentindex *2)+1
11
Q
index
right child=
A
(parentindex*2)+2
12
Q
Parent
A
(child-1)/2
13
Q
if something doesnt exist in your stack the number representation is ?
A
-1
14
Q
default layout of a JFrame
A
border layout
15
Q
TC
bubblesort
A
n2