摘要: #include #include #include typedef int ElementType; #define DIGIT 31 #define RADIX_10 10 int GetNumInPos(ElementType Num,int Pos) { ElementType Temp = pow(10,Pos-1); return ((Num/Temp) ... 阅读全文
posted @ 2018-08-05 21:40 Asurudo 阅读(161) 评论(0) 推荐(0) 编辑
摘要: #include typedef int ElementType; void SwapTwoNum(ElementType *Num_1,ElementType *Num_2) { int NumTemp = *Num_1; *Num_1 = *Num_2; *Num_2 = NumTemp; } void BubbleSort(ElementType *Arra... 阅读全文
posted @ 2018-08-05 21:39 Asurudo 阅读(135) 评论(0) 推荐(0) 编辑
摘要: #include #include typedef int ElementType; struct DoubleCircularListNode { ElementType Element; struct DoubleCircularListNode *Prior; struct DoubleCircularListNode *Next; }; struct D... 阅读全文
posted @ 2018-08-05 21:35 Asurudo 阅读(196) 评论(0) 推荐(0) 编辑
摘要: #include #include typedef int ElementType; struct SingleListNode { ElementType Element; struct SingleListNode *Next; }; struct SingleListNode* SingleListInit() { struct SingleListNod... 阅读全文
posted @ 2018-08-05 21:34 Asurudo 阅读(133) 评论(0) 推荐(0) 编辑
摘要: #include #include //Real capacity is CircularQueueMaxSize -1 #define CircularQueueMaxSize 1000 typedef int ElementType; struct CircularQueue { ElementType QueueData[CircularQueueMaxSize]; ... 阅读全文
posted @ 2018-08-05 21:32 Asurudo 阅读(157) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #define MaxSize 10000 bool _DividendIsLarger(int *Dividend,int *Divisor,int DividendLen,int DivisorLen) { int DivisorLenEnd; if(DividendLen = 0;Divis... 阅读全文
posted @ 2018-08-05 21:31 Asurudo 阅读(224) 评论(0) 推荐(0) 编辑
摘要: #include #include #include //if want to change MinHeap into MaxHeap,need to change four places //MaxHeap INT_MAX #define MINDATA INT_MIN typedef int ElementType; struct MinHeap { in... 阅读全文
posted @ 2018-08-05 21:31 Asurudo 阅读(165) 评论(0) 推荐(0) 编辑
摘要: #include #include int BigNumFactorial(int InputOrderMultiplier) { int i; double Result = 0; for(i = 1;i <= InputOrderMultiplier;i ++) { Result += log10(i); } return... 阅读全文
posted @ 2018-08-05 21:29 Asurudo 阅读(144) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #define MaxSize 1000000 char *BigNumFactorial(int InputOrderMultiplier) { int *TempResult = malloc(MaxSize*sizeof(int)); int TempResultEnd; memset(TempResu... 阅读全文
posted @ 2018-08-05 21:29 Asurudo 阅读(165) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #define MaxSize 1000 char *TwoBigNumPlus(char *InputAddend_1,char *InputAddend_2) { char *Result = malloc(MaxSize*sizeof(char)); int ResultEnd = 0; in... 阅读全文
posted @ 2018-08-05 21:28 Asurudo 阅读(191) 评论(0) 推荐(0) 编辑