自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 归并排序

//要想归并后的数组有序,前提:归并前的两个子数组是有序的 #include #include #include using namespace std; int main() {     int a[40]={0};     int b[40]={0};     int c[80]={0};     int n,m,i,j,k;     while(cin>>

2017-04-26 21:42:45 102

原创 单向链表,加数

ps:没有写free函数,可能会有安全问题,想知道请找度娘。 #include #include #include #include using namespace std; struct node {     int data;     struct node*next;//后指针 }; int main() {     struct node *head,*p

2017-04-26 20:15:57 137

转载 new 与malloc

1. malloc()函数 1.1 malloc的全称是memory allocation,中文叫动态内存分配。 原型:extern void *malloc(unsigned int num_bytes); 说明:分配长度为num_bytes字节的内存块。如果分配成功则返回指向被分配内存的指针,分配失败返回空指针NULL。当内存不再使用时,应使用free()函数将内存块释放。 1.2 voi

2017-04-26 20:03:21 91

原创 双向链表加数

ps:可能有错,请大佬指出。不考虑插头和插尾的情况。 附丑图一张 #include #include #include #include using namespace std; struct node {     int data;     struct node *pre;//前指针     struct node *next;//后指针 }; int mai

2017-04-26 20:01:12 143

原创 双向链表实现

#include #include #include #include using namespace std; struct node {     int data;     struct node *pre;//前指针     struct node *next;//后指针 }; int main() {     struct node *p,*t,*head

2017-04-26 18:03:29 160

空空如也

空空如也

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

TA关注的人

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