Technology Questions Flashcards

1
Q

binary tree

A

structure where each node has 2 subnodes

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

Linked list

A

Each link has a value and a pointer to the next thing in the list. Generally bad to have cycles. O(n) time to find stuff.

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

Stack

A

Data is pushed to the top of the stack and popped off the stack.

LIFO - last in first out

Inserting and removing is (1)

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

Queue

A

Opposite of stack

LIFO - Last in first out

Inserting and removing is O(1)

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

Merge Sort

A

Splits array into 2 smaller arrays, then when it gets to the leaf of a binary tree, sorts leaves. Then recursively floats the solution to the top

It’s O(n log(n)) in average and worst case

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

Quick sort

A

With array, pick random pivot number. Move things lower than pivot to the left and things more than pivot to the right. Recursively do the same to each subset group.

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

Binary search

A

For sorted arrays, finding a particular value. Looks at midpoint, then midpoint of left or right, etc

Takes O(log n) time

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

Graph search

A

depth first - Searches branches 100% before backing out and taking another path

Bredth first search - Go wide before going deep

Need to be careful of cycles and unconnected graphs

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