
C/C++
王老大_
奋斗在路上
展开
-
单链表基本操作:初始化,建立,插入,查找,删除
//////////////////////////////////////////// //单链表的初始化,建立,插入,查找,删除。// //////////////////////////////////////////// #include #include typedef int ElemType; //////////////////////////////////////////原创 2016-10-15 13:36:13 · 5064 阅读 · 0 评论 -
双向链表基本操作:删除、插入、双向输出
#include #include typedef struct DoubleLinkedList { int data; struct DoubleLinkedList *pre; struct DoubleLinkedList *next; }DlinkedList_Node; //建立链表 DlinkedList_Node*原创 2016-10-15 14:07:04 · 493 阅读 · 0 评论 -
二叉排序树(BST):建立,遍历(前中后),判定,查找(递归+非递归)
#include using namespace std; int g_min = -1; // BST的结点 typedef struct node { int key; struct node *lChild, *rChild; }Node, *BST; // 在给定的BST中插入结点,其数据域为element, 使之称为新的BST bool BSTInsert(Node * &p,原创 2016-10-15 21:18:06 · 1117 阅读 · 0 评论