原创 簡單棧的c語言實現
#include<stdio.h>#include<stdlib.h>#define STACK_INIT_SIZE 100#define STACKINCREMENT 10typedef struct{ char name[10]; in
原创 線表的c語言實現
#include<stdio.h>#include<stdlib.h>#define LIST_INIT_SIZE 100#define LIST_INCREMENT 10#define Status inttypedef int Elem
原创 樹的簡單c語言實現(先中後序遍歷)
#include<stdio.h>#include<stdlib.h>#define depth 5typedef int Status;typedef char TElemtype;typedef struct BiTNode{ TEle
原创 String的c語言實現
#include<stdio.h>#include<stdlib.h>#define MAXSTRSIZE 255typedef unsigned char SString[MAXSTRSIZE+2];//0號單元存放串長度,最後一個單元
原创 136. Single Number leetcode做題報告
Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should
原创 C++11 thread 生成隨機數的方法
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<thread> #include<iostream> #include<atomic> #include
原创 Linux學習筆記1:文件權限和chgrp、chown、chmod指令
文件權限 Linux中文件屬性都有所有者owner、所有者所在羣組的其他成員group、其他羣組的使用者others。 Linux下中ls -al指令能夠查看所有文件的名字以及相關的屬性。 使用該指令後顯示出來的第一項有10個字母。 如-
原创 c++ 顯式類型轉換
一個命名的強制類型轉換具有以下形式: cast-name<type>(expression); 其中,type是轉換的目標類型,而expression是要轉換的值。如果type是引用類型,則結果是左值。
原创 線性鏈表的c語言實現
寫於 2015-06-10 13:17:42 #include<stdio.h> #include<stdlib.h> typedef int Status; typedef int Elemtype; typedef struct
原创 循環隊列的c語言實現
寫於 2015-06-22 可能有錯誤,感謝指出 #include<stdio.h> #include<stdlib.h> #define MAXQSIZE 100 typedef int Status; typedef int QE
原创 鏈隊列的c語言實現
寫於 2015-06-11 可能有錯誤,感謝指出 #include<stdio.h> #include<stdlib.h> #define QUEUE_MAX_SIZE 100 typedef int Status; typedef i