Loading

上一页 1 ··· 64 65 66 67 68 69 70 71 72 ··· 75 下一页
摘要: 参考:https://www.qingsword.com/qing/python-12.html 阅读全文
posted @ 2018-10-06 10:07 拾月凄辰 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 项目:在 Wiki 标记中添加无序列表在编辑一篇维基百科的文章时,你可以创建一个无序列表,即让每个列表项占据一行,并在前面放置一个星号。但是假设你有一个非常大的列表,希望添加前面的星号。你可以在每一行开始处输入这些星号,一行接一行。或者也可以用一小段Python 脚本,将这个任务自动化。bullet 阅读全文
posted @ 2018-10-04 22:00 拾月凄辰 阅读(827) 评论(0) 推荐(0) 编辑
摘要: 强口令检测 写一个函数,它使用正则表达式,确保传入的口令字符串是强口令。强口令的定义是:长度不少于 8 个字符,同时包含大写和小写字符,至少有一位数字。你可能需要用多个正则表达式来测试该字符串,以保证它的强度。 阅读全文
posted @ 2018-10-04 21:53 拾月凄辰 阅读(880) 评论(0) 推荐(0) 编辑
摘要: 创建过程: (1) 输入第一个数据: 若为0,表示此树为空,将空指针赋给根指针,树构造完毕; 若不为0,动态分配一个节点单元,并存入数据,同时将该节点地址放入队列。 (2) 若节点不为空,从队列中取出一个节点地址,并建立该节点的左右孩子: 从输入序列中读入下一数据; 若读入的数据为0,将出队节点的左 阅读全文
posted @ 2018-09-30 15:29 拾月凄辰 阅读(1593) 评论(0) 推荐(0) 编辑
摘要: 1 int GetHeight(BinTree BT) 2 { 3 int HL, HR, MaxH; 4 5 if(BT) 6 { 7 HL = GetHeight(BT->Left); //求左子树的高度 8 HR = GetHeight(BT->Right); //求右子树的高度 ... 阅读全文
posted @ 2018-09-30 11:33 拾月凄辰 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 关键:叶子节点的左右子树都为空 阅读全文
posted @ 2018-09-30 09:59 拾月凄辰 阅读(2249) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 using namespace std; 4 5 int BF(const string& father, const string& son) //返回首次匹配的字符串中的第一个匹配的字符的下标 6 { 7 int i = 0, j = 0; //i表示主串下标,j表示子串下标 8 wh... 阅读全文
posted @ 2018-09-30 09:13 拾月凄辰 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 4 #define false 0 5 #define true 1 6 7 typedef int ElementType; 8 typedef int Position; 9 typedef int bool; 10 typedef struct QNode *PtrToQNode; 11 struct ... 阅读全文
posted @ 2018-09-30 09:12 拾月凄辰 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 //获取符号的优先级 8 int getPriority(char c) 9 { 10 int priority = -1; 11 switch (c) { 12 case '+': 13 prio... 阅读全文
posted @ 2018-09-30 09:11 拾月凄辰 阅读(518) 评论(1) 推荐(1) 编辑
摘要: 1 #include 2 #include 3 4 #define false 0 5 #define true 1 6 7 typedef int ElementType; 8 typedef int bool; 9 typedef int Position; 10 typedef struct SNode *PtrToSNode; 11 struct SNo... 阅读全文
posted @ 2018-09-30 09:10 拾月凄辰 阅读(141) 评论(0) 推荐(0) 编辑
上一页 1 ··· 64 65 66 67 68 69 70 71 72 ··· 75 下一页