Assorted algorithmic questions #2 Flashcards
Compare TCP and UDP protocol.
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
Explain the ACK mechanism in the TCP protocol.
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.
What is contained in a routing table?
- network address and netmask
- gateway
- interface (which ethernet device to use for sending the message)
- metric (cost of the link)
Describe, compare A,B and C address classes.
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
What are descendant and ancestor of a node in a tree?
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.
What is a shart, sharding?
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.
What kind of algorithmic problems are best solved with dynamic programming?
Problems whose solutions contain overlapping subproblems.