原创 TCP協議頭結構--標誌位

1、TCP標誌位 緊急指針(URG)、推送(PSH)、復位標誌(RST) 、同步標誌(SYS) 、確認(ACK)、完成(FIN):握手、揮手時用到  

原创 http常見響應狀態碼

1xx:指示信息–表示請求已接收,繼續處理。        100 http1.1協議中的首部接收成功,可以繼續發送body了。 2xx:成功–表示請求已被成功接收、理解、接受。        200(成功)用瀏覽器打開一個網頁,正常情況

原创 TCP可靠性保證

1、序號(32位seq):                                              保證數據包的有序性 2、檢驗和(16位):                                       

原创 http、https的區別

1)安全性: http協議的數據都是明文傳輸,不提供任何加密,敏感信息傳輸不安全; https採用該安全套階層(SST)進行加密傳輸、身份驗證,傳輸數據經過加密,安全性高。 2) 身份認證: https 協議需要到簽證機構(ca)申請證書

原创 1、O(1)時間內刪除鏈表節點

​​ # _*_coding:utf-8 _*_ class ListNode: def __init__(self): self.val = None self.next = None c

原创 劍指offer--面試題31:棧的壓入彈出序列

#include <iostream> #include <stack> using namespace std; bool IsPopOrder(const int* push,const int* pop,int lengt

原创 分配排序之--桶排序

#include<stdio.h> #include<malloc.h> #define MAXNUM 1000 //*****************************************************桶排序****

原创 選擇排序之--堆排序

#include <stdio.h> #include<malloc.h> void swap(int *x,int *y) { *x^=*y; *y^=*x; *x^=*y; } void HeapAdjust(int A[],i

原创 插入排序之--直接插入排序

#include<stdio.h> #include<malloc.h> void Straight_Insert(int A[],int n) { for(int i=1;i<n;i++) //共進行n-1次插入,i從1開始 {

原创 分配排序之--基數排序

#include<stdio.h> #include<malloc.h> #define MAXNUM 1000 //******************************************基數排序*************

原创 分配排序之--計數排序

#include<stdio.h> #include<malloc.h> #define MAXNUM 1000 //***************************************************計數排序****

原创 劍指offer--面試題30:包含min函數的棧

#include<iostream.h> #include<stack> using namespace std; class Solution { public: stack<int> st, minSt;//st表示存儲元

原创 交換排序之--快速排序

#include<stdio.h> int Partition( int A[], int length, int low, int high) { if(A==NULL|| length<=0 ||

原创 插入排序之--折半插入排序

#include<stdio.h> #include<malloc.h> void Binary_Insert_Sort(int a[],int length) { for(int i=1;i<length;i++) { int

原创 劍指offer--面試題26:樹的子結構

#include <stdio.h> #define nullptr NULL struct BinaryTreeNode { double m_dbValue; BinaryTreeN