The document discusses network packets and TCP/IP protocols. It introduces key concepts like packet structure, IP headers, TCP segments, round-trip time (RTT), retransmission timeout (RTO), and TCP retransmission algorithms like Karn's algorithm and Jacobson's algorithm. It explains TCP terminology such as slow start, congestion avoidance, time out, and exponential weighted moving average. The document also discusses packet vs. segment, ports, checksum, TTL, smoothed RTT, RTT variation, and algorithms for calculating RTO values and performing timer back-off for retransmissions.
HTTP/2 was created to improve on HTTP/1.1. It uses a binary framing layer which allows for multiplexing of requests and responses over a single TCP connection. This improves performance by reducing latency compared to HTTP/1.1. Other features include header compression, server push, and stream prioritization which further enhance performance and efficiency. The document provides technical details on these HTTP/2 features and includes examples of analyzing HTTP/2 traffic using Wireshark.
The document discusses network packets and TCP/IP protocols. It introduces key concepts like packet structure, IP headers, TCP segments, round-trip time (RTT), retransmission timeout (RTO), and TCP retransmission algorithms like Karn's algorithm and Jacobson's algorithm. It explains TCP terminology such as slow start, congestion avoidance, time out, and exponential weighted moving average. The document also discusses packet vs. segment, ports, checksum, TTL, smoothed RTT, RTT variation, and algorithms for calculating RTO values and performing timer back-off for retransmissions.
HTTP/2 was created to improve on HTTP/1.1. It uses a binary framing layer which allows for multiplexing of requests and responses over a single TCP connection. This improves performance by reducing latency compared to HTTP/1.1. Other features include header compression, server push, and stream prioritization which further enhance performance and efficiency. The document provides technical details on these HTTP/2 features and includes examples of analyzing HTTP/2 traffic using Wireshark.
13. Segment Tree
node left child
[start, (start+end)/2]
node right child
[(start+end)/2 + 1, end]
tree의 현재 node에 저장될 값을
구하기 위해선
왼쪽 자식 & 오른쪽 자식 값을 구해야 합니다.
16. Segment Tree
값 update는 어떻게 하는가?
숫자가 포함된 구간 node들을 모
두 변경해 주어야 함
diff를 구해야 이전 값에 변경된
상태로 update가 가능해집니다.
diff = 변경될 값 - 현재 노드 값
(val - arr[index])
1. index가 start, end 사이에
2. index가 벗어난 경우
2의 경우는 탐색을 멈추고
1의 경우는 diff만큼 각 노드들에 추
가해주자
(tree[node] =
tree[node] + diff)
18. Fenwick Tree
Binary Index Tree(BIT)
- Element Update Effectively
Prefix Sum
공간 복잡도가 이득
구현하기 쉬움
구간 합 계산 및 값 변경 시 O(log N)으로 Segment Tree와 같음
비트 연산을 사용
20. Fenwick Tree
L 배열
: 이진수로 나타내었을 때
마지막 1이 나타내는 값들을
가지는 배열
3 => 11 => 1
5 => 101 => 1
6 => 110 => 2
...
21. Fenwick Tree
Tree 배열을 보면,
1) Tree[12]에서 L[12] =>
12 = 1100 => 4개 합
=> A[9]+A[10]+A[11]+A[12]
의 합이 저장
2) Tree[7]에서 L[7] =>
7 = 111 => 1개의 합
A[7] 을 의미합니다.