原创 LeetCode447. Number of Boomerangs

Description Given n points in the plane that are all pairwise distinct, a “boomerang” is a tuple of points (i, j, k

原创 map--C++ STL 學習

map–C++ STL 學習   Map是STL的一個關聯容器,它提供一對一(其中第一個可以稱爲關鍵字,每個關鍵字只能在map中出現一次,第二個可能稱爲該關鍵字的值)的數據處理能力。   說下map內部數據的組織,map內部自建

原创 TCP三次握手四次揮手

TCP三次握手四次揮手 標誌位縮寫 全稱 中文 SYN synchronous 建立聯機 ACK acknowledgement 確認 PSH push 傳送 FIN finish 結束 RST res

原创 LeetCode 34. Search for a Range

Description Given an array of integers sorted in ascending order, find the starting and ending position of a given

原创 C++ 4種強制類型轉換

C++的四種強制類型轉換爲:static_cast、const_cast、reinterpret_cast和dynamic_cast 類型轉換的一般形式:cast-name(expression); static_cast 任

原创 TCP超時重傳、滑動窗口、擁塞控制、快重傳和快恢復

TCP超時重傳   原理是在發送某一個數據以後就開啓一個計時器,在一定時間內如果沒有得到發送的數據報的ACK報文,那麼就重新發送數據,直到發送成功爲止。   影響超時重傳機制協議效率的一個關鍵參數是重傳超時時間(RTO,Retr

原创 HTTP與HTTPS異同||HTTP1.0與HTTP1.1差別

HTTP狀態碼 分類 解釋 描述 1XX 信息 服務器收到請求,需要請求者繼續執行操作 2XX 成功 操作被成功接收並處理 3XX 重定向 需要進一步的操作以完成請求 4XX 客戶端錯誤 請求包含語法錯誤或

原创 LeetCode119. Pascal's Triangle II

Description Given an index k, return the kth row of the Pascal’s triangle. For example, given k = 3, Return [1,3,3

原创 LeetCode406. Queue Reconstruction by Height Add to List

Description Suppose you have a random list of people standing in a queue. Each person is described by a pair of int

原创 LeetCode: 338. Counting Bits

338. Counting Bits Description Given a non-negative integer number num. For every number i in the range 0 ≤ i ≤ num

原创 LeetCode543. Diameter of Binary Tree

Description Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a bina

原创 歡迎使用CSDN-markdown編輯器

歡迎使用Markdown編輯器寫博客 本Markdown編輯器使用[StackEdit][6]修改而來,用它寫博客,將會帶來全新的體驗哦: Markdown和擴展Markdown簡潔的語法 代碼塊高亮 圖片鏈接和圖片上傳 LaT

原创 LeetCode459. Repeated Substring Pattern

Description Given a non-empty string check if it can be constructed by taking a substring of it and appending multi

原创 LeetCode455. Assign Cookies

Description Assume you are an awesome parent and want to give your children some cookies. But, you should give each

原创 LeetCode 69. Sqrt(x)

Description Implement int sqrt(int x). Compute and return the square root of x. my program 思路:看似很簡單的問題,可以不斷的優化算法,