Other Algorithms Flashcards

1
Q

Binary search tree runtime

A

Search
Average: O log n
Worst case: O n

Insert/delete
Avg O log n

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

Red-black tree

A

A binary search tree that balances it self

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

B-tree

A

A binary search tree used to store data in databases

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

Inverted index

A

A hash that maps words to locations

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

Uses of an inverted index

A

Commonly used in search

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

Fourier transform

A

Breaks down something into components.
Ie a song into frequencies and notes

Used for mp3 algorithm

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

Parallel algorithms

A

Running an algorithm across multiple cores/servers etc.

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

Challenges with parallel algorithms

A

-Overhead of managing parallelism
-Load balancing

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

MapReduce

A

A popular distributed algorithm used by Apache Hadoop

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

What is MApReduce useful for

A

Working with large data sets across multiple servers

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

Map function

A

Applies the same function to each element of an array

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

Reduce function

A

Transform an array to a single item

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

Probabilistic algorithms

A

Could give false positives but don’t give false negatives

Fast and use less data

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

Bloom filter

A

Probabilistic data structure

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

HyperLogLog

A

Approximates the number of unique elements in a set

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

SHA

A

Secure hash algorithm
A one way string to string hash

17
Q

Hash

A

Short string

18
Q

Uses of SHA

A

It can tell you if two files/strings/etc are the same
Uses to store and check passwords

19
Q

Locality sensitive hashing

A

A hash algorithm that generate similar hashes for similar strings.

Could be used to compare if files/sites are similar to each other.

20
Q

Diffie-Hellman

A

A public key encrypts
A private key decrypts

21
Q

Linear programming

A

Used for optimization