hashtable

How to traverse keys of a Hashtable in alphabetical order?

What is the easiest way to traverse a hashtable's keys in ascending alphabetical order? ...

Does a hash function output need to be bounded less than the number of buckets?

I was reading about this person's interview "at a well-known search company". http://asserttrue.blogspot.com/2009/05/one-of-toughest-job-interview-questions.html He was asked a question which led to him implementing a hash table. He said the following: HASH = INITIAL_VALUE; FOR EACH ( CHAR IN WORD ) { HASH *= MAGIC_NUMBER HASH ^= CHAR...

Using Hashtables/Dictionaries with string keys & Case Insensitive Searching

Wondering if this is possible. We have an 3rd Party library that contains identification information about users... The main interaction with the library is through a HashTable which is keyed with a string, and returns an Object Graph of information for that key. The problem is, the key is obviously Case Sensitive, but what we get fro...

copy n k/v pairs from Hashtable

I have a hashtable with n number of records. I need to copy out the records between x and y and iterate through them. How would I do this? Example: HT1.Count = 500; HT2 = HT1[0] - HT1[100]; --edit-- Just so you are aware, the reasoning for this is I am generating PDF's from .MSG files. The problem arises for the end user that when ...

Big O of Hash Table vs. Binary Search Tree

Which would take longer? print all items stored in a binary search tree in sorted order or print all items stored in a hash table in sorted order. It would take longer to print the items of a hash table out in sorted order because a hash table is never sorted correct? and a BST is? ...

Which is faster to find an item in a hashtable or in a sorted list?

Which is faster to find an item in a hashtable or in a sorted list? ...

Hash tables using VLists

Phil Bagwell, in his 2002 paper on the VList data structure, indicates that you can use a VList to implement a persistent hash table. However, his explanation of how that worked didn't include much detail, and I don't understand it. Can anybody give me a more detailed explanation, or even examples? Further, it appears to me from what I ...

Data Structure for enumeration in c# where lookup is often predicated on one property of the Objects being stored

I'm wondering what Data Structure people would recommend to do the following. I have a Class which has three main properties eg. public class Example { public Object One { get; } public Object Two { get; } public Object Three { get; } } Another class contains a collection of these Objects and frequently needs to enumerate over...

What hash algorithm does .net utilise? What about java?

Regarding the HashTable (and subsequent derivatives of such) does anyone know what hashing algorithm .net and Java utilise? Are List and Dictionary both direct descandents of Hashtable? ...

How are hash tables implemented internally in popular languages?

Can someone please shed some light on how popular languages like Python, Ruby implements hash tables internally for symbol lookup? Do they use the classic "array with linked-list" method, or use a balanced tree? I need a simple (fewer LOC) and fast method for indexing the symbols in a DSL written in C. Was wondering what others have fou...

5D array hash table

I currently have a 5D array in the variable called template written into 1D array called template1D, with a hash table of 3456 (8 * 12 * 3 * 4 * 3) entries. In Matlab, the multi-dimensional array was accessed as follows: template{idx_r, idx_l, idx_rho, idx_alpha, idx_beta} However, as I have the indices going from 0-7, 0-11, 0-2, 0-3,...

Reason for Sorting a Hash Table

I was asked by an employer to sort a hash table. I always thought that the usage of a hash table was in a way non-sort friendly. Am I wrong in thinking this, and if not can you point me to a good VB.Net(Yes Kill me now, but it's an old system) method of sorting a hash table. Thanks. ...

Memcached + batch data loading + replication + load balancing, any existing solutions?

Here is my scenario: A dozen of clients reading from memcached-like store. Read-only access 50K gets/sec 99.999% availability 300 million records, 100 bytes each If one of the stores goes down the system should be able to automatically switch to another replica. When it is time for update the system should be able to quickly reload...

Hashtables/Dictionaries that use floats/doubles

I read somewhere about other data structures similar to hashtables, dictionaries but instead of using ints, they were using floats/doubles, etc. Anyone knows what they are? ...

In a web programming environment, what are the uses of a hashtable Vs other datastructures handling Key,Value pairs

I have heard of people using them for keeping track of session variables, but I really want to know if there are many uses for them and under what conditions it would be beneficial to employ a hashtable vs any other data structure that can handle key value pairs, like a dictionary for example. eg. I have heard of people putting session ...

specialised hash table c++

I need to count a lot of different items. I'm processing a list of pairs such as: A34223,34 B23423,-23 23423212,16 What I was planning to do was hash the first value (the key) into a 32bit integer which will then be a key to a sparse structure where the 'value' will be added (all start at zero) number and be negative. Given that they...

Tuples( or arrays ) as Dictionary keys in C#

I am trying to make a Dictionary lookup table in C#. I need to resolve a 3-tuple of values to one string. I tried using arrays as keys, but that did not work, and I don't know what else to do. At this point I am considering making a Dictionary of Dictionaries of Dictionaries, but that would probably not be very pretty to look at, thou...

jaxb marshall complex structure

Hi, I have a structure like this: Hashtable<String, ArrayList<Hashtable<Integer, Integer>>> complexTable And I want to marshall this using JAXB. I suppose I should write an Adapter for this, but I have no idea how this adapter should look like. Can anybody help me with this? ...

Best Way To Deliver A Static HashTable c#

Hi all! I have the following as an example: public enum HttpRequestHeader { Accept, AcceptCharset } public static class HTTP { public static Hashtable HttpRequestHeaderString { get { Hashtable returnHashtable = new Hashtable(); returnHashtable.Add(HttpRequestHeader.Accept,"Accept"); returnHashtable.Ad...

Algorithms for Optimization with Fast Disk Storage (SSDs)?

Given that Solid State Disks (SSDs) are decreasing in price and soon will become more prevalent as system drives, and given that their access rates are significantly higher than rotating magnetic media, what standard algorithms will gain in performance from the use of SSDs for local storage? For example, the high random read speed of SS...