原创 OAuth2.0認證

http://www.cnblogs.com/blowing00/p/4521135.html http://www.barretlee.com/blog/2016/01/10/oauth2-introduce/

原创 哈夫曼樹基本操作

結構體定義: typedef struct node{ int data; int l, r, p; }HuffmanTree;1、HufmanTree的建立 void createHuffmanTree(HuffmanTree

原创 鏈表的基本操作C/c++

#include <iostream> #include <stack> #include <set> using namespace std; struct ListNode{ int data; ListNode* next;

原创 c++ primer plus 習題5.8(5.9)(while(cin>>word),strcmp())

#include <iostream> #include <cstring> // prototype for strcmp() const int STR_LIM = 50; int main() { using nam

原创 網易實習,任意n個數組合求最大

#include <iostream> #include <vector> #include <algorithm> using namespace std; typedef unsigned long long int ulli;

原创 c++ primer plus 習題6.3(switch)

#include<iostream> using namespace std; int main(){ cout<<"please enter one of the following choices:\n"; cout<<"c) c

原创 c++ primer plus 習題6.1 (cctype,cin.get)

#include<iostream> #include<cctype> using namespace std; int main() { char ch,change; cout<<"please input:"; cin.get

原创 基本排序算法

#include <iostream> using namespace std; #define RADIX 10 void cp(const int array[],int k,int array_cp[]){ for (int i

原创 鄰接表圖的建立與BFS、DFS

頭文件與結構體 #include <iostream> #include <queue> #include <stdlib.h> using namespace std; bool visited[30]; struct EdgeN

原创 c++ primer plus 習題5.7(使用new爲結構創建動態數組)

#include<iostream> using namespace std; struct car{ string brand; int year; }; int main(){ int num,i; cout<<"How ma