上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页
摘要: Question:Possible Duplicate:Why should hash functions use a prime number modulus?Why is it necessary for a hash table's (the data stru... 阅读全文
posted @ 2015-04-08 01:06 vigorpush 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Website:http://srinvis.blogspot.ca/2006/07/hash-table-lengths-and-prime-numbers.htmlThis has been bugging me for some time now...The f... 阅读全文
posted @ 2015-04-08 01:00 vigorpush 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Perfect Hashing:A hash function that is injective—that is, maps each valid input to a different hash value—is said to be perfect. With... 阅读全文
posted @ 2015-04-08 00:55 vigorpush 阅读(178) 评论(0) 推荐(0) 编辑
摘要: vector容器类型 vector容器是一个模板类,可以存放任何类型的对象(但必须是同一类对象)。vector对象可以在运行时高效地添加元素,并且vector中元素是连续存储的。vector的构造 函数原型:template explicit vector()... 阅读全文
posted @ 2015-04-07 09:50 vigorpush 阅读(104) 评论(0) 推荐(0) 编辑
摘要: I have a line of code that looks like this:MyObject.PhoneNumber = '+' + ThePhonePrefix + TheBizNumber;Basically, I'm creating a phone ... 阅读全文
posted @ 2015-04-07 09:27 vigorpush 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 概述排序有内部排序和外部排序,内部排序是数据记录在内存中进行排序,而外部排序是因排序的数据很大,一次不能容纳全部的排序记录,在排序过程中需要访问外存。我们这里说说八大排序就是内部排序。 当n较大,则应采用时间复杂度为O(nlog2n)的排序方法:快速排序... 阅读全文
posted @ 2015-04-05 01:15 vigorpush 阅读(153) 评论(0) 推荐(0) 编辑
摘要: c++程序里面经常见到下面的头文件 #include 这里面iomanip的作用比较多: 主要是对cin,cout之类的一些操纵运算子,比如setfill,setw,setbase 阅读全文
posted @ 2015-04-04 15:33 vigorpush 阅读(704) 评论(0) 推荐(0) 编辑
摘要: char *s="string"的内容是不可以改的void main(){ char* pStr1 = "Hello!"; char pStr2[] = "Hello!"; change(pStr1); change(pStr2);}void ... 阅读全文
posted @ 2015-04-04 14:36 vigorpush 阅读(458) 评论(0) 推荐(0) 编辑
摘要: 'a'是char, "a"是char string,这两者都是普通的字符和字符串,和C中没什么不同值得注意的是后者包含两个字符,末尾有一个隐身的'\0'而:string str = "a" 是C++ string注意:C++中的char string和string不是... 阅读全文
posted @ 2015-04-04 14:32 vigorpush 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 需要调用string头文件 ( #include )用string里的函数c_str()可以把string转换为char* 例如char * c_str2=str1.c_str(); 阅读全文
posted @ 2015-04-04 14:18 vigorpush 阅读(205) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页