473,657 Members | 2,504 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to implement a perfect hashed without Hashtable or HashMap?

74 New Member
If I can't implement a perfect hashed algorithm without using a Hashtable or HashMap,then how is it possible to implement this type of data structure?
Oct 26 '17 #1
1 4416
Frinavale
9,735 Recognized Expert Moderator Expert
Implement a custom List that has an Add(item) method.

In this method, use your custom Hashing algorithm to calculate a Key for the item and check to see if the list already has an item with that key in it.

The items in your list may have to be customized similar to that of a dictionary where they have a "key" and a "value" so that you can check if the list has any item within it with the given key.
Oct 27 '17 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

19
2980
by: Pete | last post by:
I have form/select which executes a function using onchange. No problem. However, when I validate the page with a strict HTML 4.01 doctype at http://validator.w3.org, it demands either an action or a method for the form?. If I give it an empty action <form action="" ..... it validates OK. Is this acceptable or is there a better/standards correct way? Thanks.
2
2376
by: Alfonso Morra | last post by:
I am implementing an application which requires the storage of a large number of items in a cache. I have 3-tuple key reprented by a struct, as well as an n-tuple (n is fixed) dataset, also represented by a struct. At run time, I will no exactly the number of items in the hashtable (I will have populated it myself by loading the data from a database). During the course of the applications lifetime, I will retrieve data in the hashtable...
3
8213
by: Ohad Young | last post by:
Hi, I have an interface with an event. I'd like to explicitly implement the interface by a certain class. However, I received the following error: "An explicit interface implementation of an event must use property syntax" Here is a code sample: public interface IFoo
10
1888
by: Girish | last post by:
Ok, Ive been thinking about this problem for a while. I have 30 odd aspx pages (already built) on my website that I need to have some validation occur before the page should load. The validation is - TEST if javascript is enabled on the browser + some other plugin checks via javascript. Id rather implement this check without touching any of the aspx files. Reason is the usual - I dont want "same code" clutter in all pages (javascript...
3
2499
by: Bob | last post by:
I have a name-value pair type of data that I need to search against. It's to determine what menu item to highlight given the asp.net page name. So the list has all my page names (unique) and the corresponding menu IDs. Some pages have the same menu IDs. One every page load, I want to check the name, and get the menu ID so the menu can be displayed with the proper items highlighted. The list various from a couple of dozen entries to a...
5
16901
by: Gerald | last post by:
Recently, my program need to be run in embeded enviroment, and I cann't use standard library. But I need to use arctan(x), so I implement it like the following: inline double pow(double x, size_t n) { if (n == 0) return 1; else if (n % 2 == 0) return pow(x * x, n >> 1); else
8
1824
by: GS | last post by:
Guys: I have a question, Is it possible to implement pop-up window without Java script, we don't want to use java script since it might get blocked by pop-up blocker. Thanks in advance. GS.
1
1188
by: Smish | last post by:
hey all, My requirement is that" i need to implement page navigation..but i dnt want to use tree view control..the effect which i need is same as when v use tree view control but with out using it." Am using asp.net 1.0 using c# .. Please cld anyone give me a suggestion.. thanx.
10
1951
by: Michele Simionato | last post by:
I have always been curious about how people implement mainloops (or, in Twisted terminology, reactors). So I sit down and I wrote the following simple implementation: import itertools class SimpleReactor(object): DELAY = 0.001 # seconds
2
5890
by: dseals22 | last post by:
How to implement the perfect hashed data structure using the four basic operations (insert, fetch, delete, and update)? Will I have to use a hashtable to do this? This is my starting pseudocode below: public class HashedClass{ int ticketNumber; // keyfield string purchaserName; Hashtable hashtable = new Hashtable();
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8726
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8603
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1604
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.