自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

转载 上拉电阻和下拉电阻

2021-01-26 12:04:58 175

原创 数据结构--排序

1.冒泡排序(1)第一次比较:首先比较第一和第二个数,将小数放在前面,将大数放在后面。然后比较第2和第3个数,将小数放在前面,大数放在后面 ······ 。(2)在上面一趟比较完成后,最后一个数一定是数组中最大的一个数,所以在比较第二趟的时候,最后一个数是不参加比较的。······//简单冒泡排序举例【升序】# include <stdio.h>void bubble_sort(int *,int);int main(void){ int i; int le

2021-01-24 23:47:39 191

原创 数据结构--二叉树

#include<stdio.h>#include<malloc.h>struct BTNode{ int data;//数据域 struct BTNode *pLchhid;//左子树指针域,L是左,child是孩子,左子树 struct BTNode *pRchhid;//右子树指针域,R是右,child是孩子,右子树 };void PreTraverseBTree(struct BTNode * pT);//先序遍历二叉树void I

2021-01-24 21:56:58 89

原创 数据结构--汉诺塔

放弃你对于理解和跟踪递归全程的企图,站在高楼上看全貌# include <stdio.h>void hannuota(int n, char A, char B, char C)//把A上编号n的盘子借助B移到C{/* 如果是1个盘子 直接将A柱子上的盘子从A移到C 否则 先将A柱子上的n-1个盘子借助C移到B 直接将A柱子上的盘子从A移到C 最后将B柱子上的n-1个盘子借助A移到C*/ if (1 == n) { printf("--将编号为%d的盘子

2021-01-24 12:14:39 130

原创 数据结构--循环队列(数组实现)

#include <stdio.h>#include <malloc.h>typedef struct Queue{ int * pBase; int front; int rear;}QUEUE;void init(QUEUE *);bool en_queue(QUEUE *, int val); //入队void traverse_queue(QUEUE *);bool full_queue(QUEUE *);bool out_queue(QUEUE

2021-01-22 17:09:02 64

原创 数据结构--链式队列

# include <iostream>using namespace std;typedef struct node{ int data; struct node *pNext;}NODE, *PNODE;class Queue{private: PNODE pHead, pTail; //pHead指向无用的头结点 pHead->pNext才是指向队首元素, pTail指向队尾元素public: Queue(/* args */) { this-&g.

2021-01-21 11:55:57 111

原创 数据结构--对栈的操作

# include <stdio.h># include <stdlib.h># include <malloc.h>typedef struct Node{ int data; struct Node * pNext;}NODE,* PNODE;typedef struct Stack{ PNODE pTop; //指向栈第一个元素,存放栈元素地址,所以数据类型是struct Node类型 PNODE pBottom;}STACK

2021-01-20 18:00:43 137

原创 数据结构对数组的操作

//数据结构 对数组的操作2021/1/12/18点25分# include <malloc.h> //包含了malloc函数# include <stdio.h># include <stdlib.h> //包含了exit函数struct Arr{ int * pBase;/* data */ int len; int cnt;};void init_arr(struct Arr * pArr, int length); /

2021-01-19 17:15:18 136

原创 数据结构对链表的操作

#include <stdio.h>#include <malloc.h>#include <stdlib.h>typedef struct Node{ int data; struct Node * pNext;//指针域}NODE, *PNODE;//NODE等价于struct Node PNODE等价于struct Node *//函数声明PNODE create_list(void); //创建链表void traverse_lis

2021-01-19 17:13:09 74

原创 学习Java的记录

Java中异常和错误的区别:异常可以编译过去,没有语法错误,运行时会出错。报错Exception·····,可以用try捕获继续运行。错误编译时就会出错。

2021-01-13 18:16:47 94

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除