原创 二叉排序樹的查找

#include<stdio.h> #include<stdlib.h> /* 遞歸前中後遍歷 */ typedef struct node {   int data;   struct node*left;   struct node*r

原创 單向循環鏈表

#include<stdio.h> #include<stdlib.h> #define N 9 typedef struct node{    int  data;    struct node * next; }ElemSN; Elem

原创 a+b問題

 public int aplusb(int a, int b) {        if((a&b) == 0)            return a|b;        return aplusb(a^b,(a&b)<<1);    }

原创 鏈表是否有環

p1 = p2 = h; do{     p1 = p1 ->next;     p2 = p2 ->next ->next; }while(p2||p2->next||p1 == p2); if(p1 == p2)   return tr

原创 《將博客搬至CSDN》

https://mp.csdn.net/blogmove/create

原创 數組逆置

#include<stdio.h>void fun(int a[], int n){int i,j,temp;for(i = 0,j = n-1; i < j; i ++,j --){//  交換時 i< j即可完成   temp = a[

原创 帶頭結點的鏈表

#include<stdio.h>#include<stdlib.h>#define N 9typedef struct node{   int  data;   struct node * next;}ElemSN;ElemSN  * C

原创 《將博客搬至CSDN》

https://mp.csdn.net/blogmove/create

原创 鏈表是否有環

p1 = p2 = h; do{     p1 = p1 ->next;     p2 = p2 ->next ->next; }while(p2||p2->next||p1 == p2); if(p1 == p2)   return tr

原创 鏈表節點的刪除(刪除鏈表當中最大值,如果有重複值只刪除一個)

#include<stdio.h>#include<stdlib.h>#define N 9typedef struct node{   int  data;   struct node * next;}ElemSN;ElemSN  * C

原创 鏈表結點的移動(最大值移到頭結點)

 #include<stdio.h>#include<stdlib.h>#define N 9typedef struct node{   int  data;   struct node * next;}ElemSN;ElemSN  *

原创 鏈表的逆置(頭插法)

#include<stdio.h>#include<stdlib.h>#define N 5typedef struct node{   int  data;   struct node * next;}ElemSN;ElemSN  * C

原创 普通二叉樹的建立

#include<stdio.h> #include<stdlib.h> typedef struct BinaryTreeNode {     int data;     struct BinaryTreeNode *Left;    

原创 a+b問題

 public int aplusb(int a, int b) {        if((a&b) == 0)            return a|b;        return aplusb(a^b,(a&b)<<1);    }

原创 循環鏈表的key刪除

#include<stdio.h>#include<stdlib.h>#define N 9typedef struct node{   int  data;   struct node * next;}ElemSN;ElemSN*Crea