码迷,mamicode.com
首页 >  
搜索关键字:hash-table    ( 402个结果
R语言——哈希表
前言:在 R 语言中有个包——hash 包提供了我们需要的哈希结构,本文主要介绍该 hash 包的使用。 (使用之前先 install.packages(“hash”) 进行安装)其实,数据框也可以实现哈希表的功能,但是效率不高,操作不方便。 另外,在之前有个 rdict 包,使用起来就像 Python 里面的字典一样好用,详情请见:rdict: A hash table for R using...
分类:编程语言   时间:2015-08-21 01:54:34    阅读次数:5359
Codeforces Round #FF (Div. 2) A. DZY Loves Hash
DZY has a hash table with p buckets, numbered from 0 to p?-?1. He wants to insert n numbers, in the order they are given, into the hash table. For the i-th number xi, DZY will put it into the bucke...
分类:其他好文   时间:2015-08-20 13:10:01    阅读次数:92
操作系统 之 哈希表 Linux 内核 应用浅析
1.基本概念         散列表(Hash  table,也叫哈希表),是根据关键码值(Key  value)而直接进行访问的数据结构。也就是说,它通过把关键码值映射到表中一个位置来访问记录,以加快查找的速度。这个映射函数叫做散列函数,存放记录的数组叫做散列表。 2. 常用的构造散列函数的方法         散列函数能使对一个数据序列的访问过程更加迅速有效,通过散列函数,数据元素将被更...
分类:系统相关   时间:2015-08-18 12:06:27    阅读次数:122
Java集合(15)--ConcurrentHashMap源码分析
ConcurrentHashMap使用了锁分离技术, 使用了多个锁来控制对hash表的不同部分进行的修改。使用段(Segment)来表示这些不同的部分,每个段其实就是一个小的hash table,它们有自己的锁。只要多个修改操作发生在不同的段上,它们就可以并发进行。 有些方法需要跨段,比如size....
分类:编程语言   时间:2015-08-18 01:03:22    阅读次数:127
3.Longest Substring Without Repeating Characters
题目 Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3...
分类:其他好文   时间:2015-08-17 06:33:30    阅读次数:232
BST 与 hash table 取舍
一个设计良好(注意是设计良好的)的hash table 如下操作均为O(1)SearchInsertDelete而self-balancing BST 这些操作均为O(logn)所以在上面这些操作上hash table更优质, 但是如果有如下的需求场景, BST比hash table跟合适得到所有的...
分类:其他好文   时间:2015-08-16 16:28:27    阅读次数:115
1.Two Sum
题目 Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the targe...
分类:其他好文   时间:2015-08-16 02:10:26    阅读次数:172
PAT 1078. Hashing (25)
1078. Hashing (25)The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of t...
分类:其他好文   时间:2015-08-15 18:07:29    阅读次数:152
[LeetCode] Two Sum
The basic idea is to maintain a hash table for each elementnuminnums, usingnumas key and its index (1-based) as value. For eachnum, search fortarget -...
分类:其他好文   时间:2015-08-15 13:15:53    阅读次数:204
Redis学习(4)-数据类型set和zset
Set数据类型及操作Set集合是通过hash table实现的,所以添加、删除和查找的复杂度都是O(1),hash table会随着添加或者删除自动的调整大小,需要注意的是 hash table大小时候需要同步(获取写锁)会阻塞其他读写操作,可能不久后就会改用跳表(skip list)来实现,跳表已...
分类:其他好文   时间:2015-08-15 09:01:20    阅读次数:113
402条   上一页 1 ... 25 26 27 28 29 ... 41 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!