原创 數據結構學習筆記之堆排序

堆排序是排序算法的一種,它利用了堆(大根堆或小根堆)的性質(樹中每個結點的值大於其左右孩子的值,根節點爲堆中最大值),將待排序列初始化爲堆,然後將根結點與末尾結點交換值,從樹中刪去末尾結點, 並對根結點進行堆調整使該樹依舊保持堆結構,重

原创 數據結構學習筆記之二叉樹 BST

 BST是二叉樹的一種,其中每個結點的左孩子小於該結點的值,右孩子大於於該結點的值,對該樹進行中序遍歷可以得到一組有序序列 //二叉搜索樹 #include <stdio.h> typedef struct node {

原创 找公共元素

求兩個有序數組的公共元素 求三個有序數組的公共元素 求 n 個有序數組的公共元素 #include<stdio.h> #include<stdlib.h> int* two_common(int a[], int b[], int

原创 CCF 201912-01(報數)

 題目信息:參考鏈接 //01-報數 void numStat(){ int a[4] = {0}; int n, cnt = 1, i = 0, jmp = 0;//優化 去除jmp scanf("%d",

原创 CCF 201912-02(回收站選址)

題目信息:參考鏈接 typedef struct{ int x; int y; }point, *pot; void trash(){ int n, i, j, x, y, flag, sig; in

原创 CCF 201803-03(URL映射)wait

題目信息:首頁 - 計算機軟件能力認證考試系統 #include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct{ char name[100];

原创 郝斌JAVASE大綱

郝斌老師java課程的總結,純手打分享,方便複習回顧 第一部分 面向對象 1 封裝 類:對一類事物抽象所得到的一個概念 對象:一個具體的事物 構造函數:     特點:不能有返回值 方法名與類名相同 可以有多個     注意:默認生成

原创 大整數加法(數組實現)

實現任意範圍的兩個整數的加法( 整數的範圍用 int 型的變量無法表示) //大整數加法。 實現任意範圍的兩個整數的加法( 整數的範圍用 int 型的變量無法表示) void addSuper(){ char a[50]={

原创 大整數加法(鏈表實現)

實現任意範圍的兩個整數的加法( 整數的範圍用 int 型的變量無法表示) #include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct node{

原创 CCF 201909-02(小明種蘋果續)

 題目信息:首頁 - 計算機軟件能力認證考試系統 #include<stdio.h> #include<string.h> #include<stdlib.h> //小明種蘋果(續) void appleXM2(){ in

原创 CCF 201909-01(小明種蘋果)

 題目信息:參考鏈接 #include<stdio.h> #include<string.h> #include<stdlib.h> typedef struct{ int x; int y; }point, *p

原创 CCF 201803-03(URL映射)

題目信息:參考鏈接 #include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct{ char name[100]; char num[

原创 CCF 201912-03(化學方程式)-待完善

題目信息:參考鏈接 吐槽:機試要求使用C,本想着找題練練手,結果代碼越寫越長。。。。。。 使用測試平臺,網上找到的測試數據都可以通過,只有60分,實在找不出毛病出在哪兒,哭( ▼-▼ ) 輸入 H2+O2=H2O 2H2+O2=2H2O

原创 CCF 201803-02(碰撞的小球)

題目信息:參考鏈接  #include<stdio.h> #include<stdlib.h> #include<string.h> //碰撞的小球 0 - L void ball(){ int n, L, t, i, x

原创 CCF 201803-01(跳一跳)

 題目信息:參考鏈接 #include<stdio.h> #include<stdlib.h> #include<string.h> void jump(){ int cur, pre, flag = 0, score =