Assorted algorithmic questions #2 Flashcards

1
Q

Compare TCP and UDP protocol.

A

TCP: connection oriented, reliable (lost packets are resent), ordered (order of packets guaranteed), heavyweight (lost packets resent, out of request packets put back together)

UDP: connectionless, unreliable, not ordered, lightweight

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

Explain the ACK mechanism in the TCP protocol.

A

The receiver must acknowledge each TCP packets. If a packet is not acknowledged, then it is sent again. ACK packet is used for this purpose. A TCP window is the amount of outstanding data a sender can send before it gets ACKs back.

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

What is contained in a routing table?

A
  • network address and netmask
  • gateway
  • interface (which ethernet device to use for sending the message)
  • metric (cost of the link)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe, compare A,B and C address classes.

A

Class A: Size of network bits: 8, Number of networks: 128 (2^7), Start address: 0.0.0.0, End Address: 127.255.255.255

Class B: Size of network bits: 16, Number of networks: 16384 (2^14), Start address: 128.0.0.0, End Address: 191.255.255.255

Class C: Size of network bits: 24, Number of networks: 2,097,152 (2^21), Start address: 192.0.0.0, End Address: 223.255.255.255

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

What are descendant and ancestor of a node in a tree?

A

Descendant: any node that is reachable from a given node. Child, grandchild, great-grand child, etc.

Ancestor: Any node for which this node is descendant.

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

What is a shart, sharding?

A

A database shard is a horizontal partition of data in a database or search engine. Each individual partition is referred to as a shard or database shard.

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

What kind of algorithmic problems are best solved with dynamic programming?

A

Problems whose solutions contain overlapping subproblems.

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