CS50: Weeks 6-11 Flashcards

1
Q

What is hashing?

A

Hashing is taking an input and using that input to compute a value (e.g., where to place in a sorted list), using a hash function.

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

What is separate chaining?

A

Separate Chaining is an array of linked lists, one method to handle collisions in a hash table.

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

What is linear probing?

A

Linear Probing is traversing along an array to find an open spot to put a new element; another method to handle collisions in a hash table.

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

What is a trie?

A

A Trie is a search tree that is optimized for retrieval.

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

What is a stack?

A

A Stack is a data structure with the actions Push, Pop that is LIFO (last in, first out).

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

What is a queue?

A

A Queue is a data structure with the actions Enqueue, Dequeue that is FIFO (first in, first out).

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

What is a binary search tree?

A

A Binary Search Tree is a data structure where each element has two children: a left and right path (to divide/conquer related values) – n log n sorting.

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

What is a hash table collision?

A

Collisions occur when attempting to put two values (whose placements were produced by the hash function) into the same index. This can be resolved with either linear probing or separate chaining.

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

What is an IP address?

A

An IP (Internet Protocol) address is a unique ID that every device on the internet has in order to communicate.

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

What is the path of communication on the internet for a typical computer?

A

laptop -> AP (access point) -> Switch (device with data jacks) -> Router (route packets from sender to destination) -> Internet.

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

What is DHCP and what does it do?

A

DHCP (Dynamic Host Configuration Protocol) provides dynamic IP address to consumers.

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

What is DNS and what does it do?

A

DNS (Domain Name System) transalates URLs (host names, domain names) to IP address and vice versa.

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

What is TCP?

A

TCP (Transmission Control Protocol) is the communications backbone of the internet.

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

What is HTTP?

A

HTTP (Hypertext Transfer Protocol) is the layer by which websites are delivered on the internet.

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

What is HTML?

A

HTML (Hypertext Markup Language) is the markup language used to create websites.

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