2014年9月29日
摘要: 二叉排序树(BinarySortTree)又称二叉查找树,亦称二叉搜索树。它或者是一棵空树;或者是具有下列性质的二叉树:(1)若左子树不空,则左子树上所有结点的值均小于它的根结点的值;(2)若右子树不空,则右子树上所有结点的值均大于它的根结点的值;(3)左、右子树也分别为二叉排序树;现在贴出对于二叉... 阅读全文
posted @ 2014-09-29 16:34 人生如梦多半是在演戏 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 链表节点ListNode.h 1 #include "stdafx.h" 2 #include 3 using namespace std; 4 template class LinkStack; 5 template 6 // 链表节点 7 class ListNode{ 8 privat... 阅读全文
posted @ 2014-09-29 12:20 人生如梦多半是在演戏 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 双链表链表节点ListNode.h 1 #include "stdafx.h" 2 #include 3 using namespace std; 4 5 template class DoublyList; 6 template 7 // 节点信息 8 class ListNode{ 9 ... 阅读全文
posted @ 2014-09-29 11:08 人生如梦多半是在演戏 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 单链表大整数加法,节点是char型。First List: head->1->8->9Second List: head->9->8->1Result List: head->1->1->7->0实现了单链表(单链表类模板),现在使用单链表实现大整数加法 1 #include "stdaf... 阅读全文
posted @ 2014-09-29 10:55 人生如梦多半是在演戏 阅读(481) 评论(0) 推荐(0) 编辑
摘要: 单链表类模板节点头ListNode.h 1 #include "stdafx.h" 2 #include 3 using namespace std ; 4 template class SingleList; 5 template 6 class ListNode{ 7 private: 8 ... 阅读全文
posted @ 2014-09-29 10:48 人生如梦多半是在演戏 阅读(231) 评论(0) 推荐(0) 编辑