![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
文章平均质量分 55
cdjccio
这个作者很懒,什么都没留下…
展开
-
数据结构之单链表
#include "stdafx.h" #include "stdio.h" #include #include "string.h" typedef int elemType ; /************************************************************************/ /* 以下是关于线性表链接存储(单转载 2017-07-21 11:16:02 · 243 阅读 · 0 评论 -
数据结构之链表的增删改查逆置及传统链表与非传统链表
本质:结构体是一种构造数据类型; 用途:把不同类型的数据组合成一个整体-------自定义数据类型。 #include #include #include #include // 传统链表 typedef struct Node { int data; struct Node *next; }SLIST; // 不包含 data typedef struct myN原创 2017-09-25 21:04:37 · 216 阅读 · 0 评论 -
递归的经典案例——八皇后问题
解决方案: 算法是逐行安排皇后的,其参数row为现在正执行到第几行。n是皇后数,在八皇后问题里当然就是8啦。 第2行好理解,如果程序当前能正常执行到第8行,那自然是找到了一种解法,于是八皇后问题解法数加1。如果当前还没排到第八行,则进入else语句。遍历所有列col,将当前col存储在数组c里,然后使用is_ok()检查row行col列能不能摆皇后,若能摆皇后,则递归调用que...原创 2018-05-08 20:17:25 · 288 阅读 · 0 评论 -
普通排序算法和高效排序算法
#include <iostream> #include <time.h> #include <algorithm> using namespace std; //--------------------------------------------- // 普通排序算法 //---------------------...原创 2018-08-12 21:40:59 · 485 阅读 · 0 评论