- 博客(11)
- 收藏
- 关注
原创 王爽实验16
我的书是第二版,16.4里面的3号函数好像有点问题,答案也感觉不太简洁 把自己写的分享出来,欢迎讨论~ assume cs:code code segment start: mov ax, cs mov ds, ax mov si, offset f mov ax, 0 mov es, ax mov di, 200h mov cx, offset fend - offset f .
2022-04-27 19:44:38
200
原创 算法汇总(自用,更新中)
最近在看算法课,汇总一下写的代码,方便查阅,也欢迎大家翻看。 二叉树的各种操作 创建二叉树 先序遍历二叉树 中序遍历二叉树 后序遍历二叉树 层次遍历二叉树
2022-03-14 23:32:44
40
原创 创建二叉树-先序
先序创建二叉树 BT *create_BT_pre() { BT *root = new BT; string temp; static int order = 0; //记录先序序列中二叉树的序号 cout << "Please enter the digit: "; getline(cin, temp); if (temp == "0") return NULL; else { root->text = temp; root->num =.
2022-03-14 22:31:49
359
原创 算法课记录1 - 判断单链表是否是回文
#include <iostream> #include <stack> #include "../Link_functions.h" using namespace std; bool isPlaindrome(link* head) { if (head->next->next == NULL) //若只有一个结点,直接返回true return true; if (head->next->next->next == NULL) {
2022-03-10 23:57:15
1236
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人