自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

BuXiao的专栏

坚持再坚持~

  • 博客(11)
  • 资源 (13)
  • 收藏
  • 关注

原创 Iterator_traits到底有什么用?

最近在看《STL源码剖析》,到了将iterator_traits的这一节(3.4)。实现它的代码倒是看得懂,但是对它的使用场景却是有点摸不着头脑。让我先贴一段代码,然后我们再慢慢看。#include #include using namespace std;//第一种方式template struct iter_traits{ typedef typename I

2015-03-03 22:29:39 4402 3

原创 Young tableaus 的一种实现方法

附上一种实现方法的源码:#include #include #include using namespace std;class young_tableaus{ #define DEFAULT_VALUE -1public: young_tableaus(int m, int n):_m(m),_n(n),_i(-1),_j(n-1),_count(0),

2013-10-21 21:36:01 687

原创 不同情景下的快速排序的优化

最近一直在做排序算法的题目,插入排序,归并排序,堆排序,快速排序。不得不说,快速排序真的很快,特别是当输入数据的个数n很大时(我都是以1亿个数据做实验,并且数据的值是随机的,相同的数据很少)。虽然快速排序,归并排序和堆排序的时间复杂度都是nlgn,但可能是因为常系数的原因,快速排序是这三种算法中最快的。即便如此,快速排序也是有优化的空间的。针对不同的情景,有不同的优化方法。情景1:大数

2013-09-23 23:49:56 641

原创 对归并排序的优化和思考

算法导论的课后习题中有这样一道题目(Problems 2-1):即当n的个数较小时,插入排序的速度是要优于归并排序的。原因是:插入排序的时间复杂度是n的平方,即C1n^2;而归并排序的时间复杂度是nlgn,即C2nlgn;当n较小时,由于C1和C2关系,使得插入排序的速度可以比归并排序的速度快。正是利用了这个性质,可以对归并排序的算法进行一下优化。方法一就是题中所说的,将大小为n的数组

2013-09-22 22:15:22 685

原创 Chapter 3, Exercise 3.2.4

2013-09-15 19:26:53 374

原创 Chapter 3, Exercise 3.2.3

2013-09-15 19:23:11 547

原创 Chapter 2, Problem 2-4

这里先给出了一个定义:数组中的两个元素,如果排在前面的元素(iA[j])排在后面的元素,那么这对元素(i,j)就被定义为A的一个Inversion。 a.(2,1)(3,1)(8,6)(8,1)(6,1)b.很明显,一个从大到小排列的数组含有最多的inversion,即,其个数为n-1+n-2+n- 3+……+1=n(n-1)/2 c.插入排序的运行时间是与数组中inversi

2013-09-04 22:27:51 530

原创 Chapter 2, Exercise 2.3-7

即给定一个大小为n,元素为整数的数组S,以及另外一个整数x,用一个算法来确定:是否可以在S中找到两个整数,使得它们的和是x。要求该算法的时间复杂度为nlgn。 比较容易想到的方法是:先求出S中任意两个整数相加所得到的和的集合Sum,然后从Sum中搜索x,如果能找到,那么就可以确定S中有两个整数的和是x。 但是这种方法的时间复杂度是n2。因为求出S中任意两个整数的和需要n2的时间(假

2013-09-04 18:45:13 491

原创 目录说明

本目录下的题目都是从《Introduction to Algorithms (third edition)》各章节的Execises和Problems中,选取的一些我觉得比较有意思的和有启发性的。我将它们证明出来或者用程序实现,将思路和结果放在这里,以供日后复习和大家参考!

2013-09-01 00:01:43 374

原创 Chapter1,Problems 1-1

>第三版,Chapter1,Problems 1-1,即对输入为n的一个算法,假设其需要运行f(n)毫秒才能得出结果,那么对下表中不同的时间t,算出能在此时间能完成运行所对应的最大的n。一般的算法题都是对相同的输入大小n,计算不同的运行时间。此题正好反过来,限定时间,看在这个时间内,不同的算法能够求解的最大的输入大小。为了有一个直观的认识,我计算了一下,得出了下面的结果

2013-08-30 00:01:08 586

转载 Makefile 自动变量的含义和用法(转载)

重新开始阅读linux kernel源代码,在这之前看了一下Makefile,发现很多知识都已经遗忘。俗话说好记性不如赖笔头,看来掌握的东东还是要及时的记录,这才是王道!原文地址:http://blog.csdn.net/junnes/article/details/7683110所谓自动化变量,就是这种变量会把模式中所定义的一系列的文件自动地挨个取出,直至所有的符合模式的文件

2013-08-24 20:50:28 587

Google大数据经典论文(GFS/BigTable/MapReduce)

google经典的三篇论文,大数据/Hadoop必看。

2015-02-13

TCP/IP详解 2:实现(英文版)

经典的网络基础书籍,英文版的,可以一看。

2014-06-24

MATLAB-SIMULINK通信系统建模与仿真实例分析

关于用Matlab进行通信系统仿真的书籍,对于在校的学生和有工作需要的人事都非常合适,非常经典

2011-12-08

understanding.linuxnetwork.internals.chm

不多说了,linux network的经典书籍

2010-11-17

Unix V7 操作系统源代码

学习unix操作系统的很好的材料.。。。。。。

2010-06-30

Unix V6 操作系统源代码

学习unix的很好的资源,可以和《unix操作系统设计》一起看

2010-06-30

inside visual c++.chm

David J. Kruglinski ,fifth edition

2010-04-06

WindowsProgramming.chm

Programming Windows was first published by Microsoft Press in 1988 and has since become regarded as the best introductory text on the subject. In May 1994, Petzold was one of only seven people (and the only writer) to be given a Windows Pioneer Award from Windows Magazine and Microsoft Corporation for his contribution to the success of Microsoft Windows.

2010-04-06

programming windows with mfc.chm

Programming Windows with MFC is divided into four parts. Part I introduces the core tenets of MFC and Windows programming, beginning with a simple "Hello, MFC" application and introducing, one by one, menus, controls, dialog boxes, and other application building blocks. Part II builds on the foundation laid in Part I with a detailed look at the document/view architecture. In particular, Chapters 9, 10, and 11 reveal much of the "magic" behind documents and views and explain not only how to write basic document/view applications but also how to implement some not so basic features such as split-window views of a document and print previews. Part III covers some of the more advanced features of Windows and MFC—features such as color palettes, bitmap handling, and multiple threads of execution. In Part IV, you'll learn how MFC wraps its arms around COM, OLE, and ActiveX and how to write COM-enabled applications and software components. By the time you're finished with Chapter 21, you'll be well versed in the art of 32-bit Windows programming using MFC. And you'll have prodigious amounts of sample code to draw from when it's time to strike out on your own and write your first great Windows application.

2010-04-06

programming applications for windows.chm

what this book is all about: the basic Windows building blocks that every Windows developer should be intimately aware of.

2010-04-06

空空如也

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

TA关注的人

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