自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 资源 (1)
  • 收藏
  • 关注

原创 希尔排序(ShellSort)

时间复杂度O(n^1.25)~O(1.6n^1.25) 空间复杂度:O(1)#include<iostream>using namespace std;void ShellSort(int *arr, int size){ int gap = size; //两个数之间的距离 while (gap > 1) { gap = gap / 3 + 1;

2015-12-12 16:19:21 344

原创 简单的进度条

#include<stdio.h>#include<string.h>#include <windows.h>#define N 101void proc(){ int count = 0; char arr[N]; memset(arr, '\0', sizeof(arr)); char* lable = "|/-\\"; // '\'为转义字符若要输出‘\

2015-12-08 21:58:48 301

原创 插入排序

#include<iostream>using namespace std;void InsertSort(int* arr, int size){ for (int i = 1; i < size; i++) { int end = i - 1; while (arr[end] > arr[end + 1] && end >= 0)

2015-12-06 20:17:04 302

原创 单链表(c语言版)

SList.h#pragma once#include<stdio.h>#include<assert.h>#include<malloc.h>typedef int DataType ;typedef struct Node{ DataType data; struct Node* next;}Node, *PLinkList;void InitList(PLinkL

2015-12-06 17:35:46 391

原创 堆的实现及堆的各种应用

#include<iostream>#include<vector>using namespace std;template<class T>class Less //仿函数{public: Less() {} bool operator()(const T& l, const T& r) { return l < r; //实现小堆

2015-12-06 17:14:14 416

原创 用位图解决大数据存储

BitSet.h#include<iostream>#include<assert.h>using namespace std;class BitSet{public: BitSet(size_t N) //N表示存储数据的范围 { _size = N / 32 + 1; _arr = new size_t[_size]; me

2015-12-05 17:21:39 692

1. 编写一个程序,它从标准输入读取C源代码,并验证所有的花括号都正确的成对出现。

1. 编写一个程序,它从标准输入读取C源代码,并验证所有的花括号都正确的成对出现。

2015-03-08

空空如也

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

TA关注的人

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