- 博客(9)
- 收藏
- 关注
原创 顺序栈
Head fileusing ElementType = int;#define MaxSzie 100#define Eof -1using PtrTop = int;struct SeqStack{ ElementType data[MaxSzie]; PtrTop top;};using PtrStack = SeqStack*;void InitStack(P
2015-04-21 22:13:46 379
原创 双向链表
今天的内容是双向链1. Head File/*Double linked list */using ElementType = int;struct Node{ ElementType data; Node* prior; Node* next;};using PtrNode = Node*;using Position = Node*;//Operation
2015-04-20 13:16:30 663
原创 循环单链表
Head file/*Circular linked list */using ElementType = int;struct Node{ ElementType data; Node* next;};using PtrNode = Node*;using Position = Node*;//Operation .void InitList(PtrNode p);
2015-04-19 16:32:58 550
原创 数据结构之链表
头文件using ElementType = int;struct Node{ ElementType data; Node* next;};using PrtNode = Node*;using Position = PrtNode;void InitLinkList(PrtNode p);bool IsEmpyt(PrtNode p);bool IsLast(Prt
2015-04-17 18:41:06 865
原创 数据结构之顺序表
头文件:using ElementType = int;#define MaxSize 100struct SeqList{ ElementType data[MaxSize]; int length; /*the size of the seqlist */};using PtrList = SeqList*;using Position = int;using Le
2015-04-16 11:28:25 725
原创 Summary Of SQL
SQL基础知识总结1.数据库和数据库管理系统区分:DataBase(DB),DataBase Management System(DBMS). 2.Type of DBMS : 1.层次性数据库(Hierarchical DataBase ,HDB) 2.关系型数据库(Relational DB,RDB) 3.面向对象数据库(Object Oriented DB,OODB)
2015-04-11 22:18:42 591
原创 算法交作业之查找
前言: 刚刚写了一篇发泄文,果不其然,心里面舒服很多。既然心情舒畅了,那就继续写下去吧。假定: 我们假定查找的数据唯一存在,数组中没有重复的数据存在。普通查找: 适用情景: 无特征,需要遍历整个范围才可以确定。#include #include //普通的查找算法。templateunsigned n>int Find_Array(c
2015-04-11 11:29:31 591
原创 算法交作业之最大公约数
今天写一下最大公约数算法,英文简称为Gcd算法。1.递归解法:/*书上并没有给出递归的解法,可能是觉得这个解法不是很完美,但是给出来就当学习下递归。*/int Gcd(unsigned num1, unsigned num2){ if (num1 == 0 || num2 == 0)//算法基于欧几里德的算法。 return (num1 > num2) ? num1 :
2015-04-10 17:48:32 510
原创 算法交作业之最大子序列问题
最近看《数据结构与算法分析》一书,书中提供的一些算法太棒了,忍不住动手实现了下。有错误请指出,谢谢。最大子序列问题求解:1.第一种解法:int MaxSubSequence(const int array[], int length){ if (length < 0) //数组长度不可以为0. return 0; int MaxSum = 0,ThisSum;
2015-04-09 13:37:17 634
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人