132 final Flashcards

1
Q

TC

sorting w/o recursion

A

n2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

TC

searching a sorted array

A

log n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

TC

searching array

A

n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

TC

sorting recursively

A

nlogn

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

TC

sort a tree

A

logn

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

TC

search a tree

A

n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

why is bubblesort useful for smaller data sets?

A

bubblesort can be broken out of, it knows when it is sorted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

TC

bubblesort best time

A

n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

to remove from a linked list

A

x.next.prev = x.prev

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Index

left child =

A

(parentindex *2)+1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

index

right child=

A

(parentindex*2)+2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Parent

A

(child-1)/2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

if something doesnt exist in your stack the number representation is ?

A

-1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

default layout of a JFrame

A

border layout

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

TC

bubblesort

A

n2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

TC

selection sort

A

n2

17
Q

TC

quicksort

A

nlogn

18
Q

TC

mergesort

A

nlogn

19
Q

variable

static

A

belongs to the class and can be accessed by the class, but not by objects of the class

20
Q

variable

this

A

can call on another constructor in your class