473,550 Members | 2,402 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamic Hashing

Hi friends

I know Static Hashing and i know about Dynamic Hashing, still i have
problem to make program with Dynamic Hashing I am new in "C" world,
please help me, my problem is:

i have to make program in Dynamic hashing i have to store int value in
nodes user only enter int value by this value i have to find hash key
and make symbol table
my struct are
-----------------------------------------------------------------------------
struct DynamicHashNode
{

int data;
struct DynamicHashNode *NextNode;
};

struct DynamicHashTabl e
{
char symbol[1];
struct DynamicHashTabl e *NextTable;
};
----------------------------------------------------------------------------------

+-----------+------------+ +-----------+------------+
| Symbol | Address | | int Data| Address |
+-----------+------------+ +-----------+------------+
^------------------ 0x605010

help me how can i get hash key and how can i make symbol by this int
value i want to make it dynamic hashing

Thanks

+-----------+------------+
| Symbol | Address |
+-----------+------------+

Nov 13 '07 #1
1 4396
Tinku wrote:
Hi friends

I know Static Hashing and i know about Dynamic Hashing, still i have
problem to make program with Dynamic Hashing I am new in "C" world,
please help me, my problem is:

i have to make program in Dynamic hashing i have to store int value in
nodes user only enter int value by this value i have to find hash key
and make symbol table
Do I smell homework?
my struct are
-----------------------------------------------------------------------------
struct DynamicHashNode
{

int data;
struct DynamicHashNode *NextNode;
};

struct DynamicHashTabl e
{
char symbol[1];
struct DynamicHashTabl e *NextTable;
};
If you intend "symbol" to be a variable length array (with the [1] being
a dummy length), then you're set to overwrite your NextTable pointer. If
not, why have it as an array at all?
----------------------------------------------------------------------------------

+-----------+------------+ +-----------+------------+
| Symbol | Address | | int Data| Address |
+-----------+------------+ +-----------+------------+
^------------------ 0x605010

help me how can i get hash key and how can i make symbol by this int
value i want to make it dynamic hashing
I, for one, have no idea what you are trying to do. If you gave a little
more information about your aims (what does the one character array
called "symbol" represent, what is the actual "use case" for this
structure?), it would be a lot easier to give you some guidance.

It's also helpful to see what you've tried and some information about
exactly what problems you've encountered.

However, I do wonder whether this is a discussion about programming in C
(which would be fine here) or about algorithms (which may be better done
in comp.programmin g, perhaps).
Nov 13 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1995
by: Pat | last post by:
I want to look for some one-to-one hashing function. In C++, any one-to-one hashing function?
1
3000
by: snowteo | last post by:
Hi,I have to do this exercises can you help me: 1)Write a program to implement exetendible hashing.If the table is small enough to fin in main memory,how does its performance compare with open and closed hasing? 2)A basic program consists of a series of statements,each of which is numbered in ascending order.Control is passed by use of a goto...
11
3412
by: Wm. Scott Miller | last post by:
Hello all! We are building applications here and have hashing algorithms to secure secrets (e.g passwords) by producing one way hashes. Now, I've read alot and I've followed most of the advice that made sense. One comment I've seen alot about is "securing the hashing routine" but no-one explains how to accomplish this. So how do I secure...
10
2837
by: Dino M. Buljubasic | last post by:
Hi, I am using MD5 to hash my passwords and add them to database as hashed. I have noticed though that some passwords don't get recognized and I suppose that it happen because hashing might introduce some characters in my password that are not handled properly by SQL server then. For example, password 'startreck' works just fine password...
19
3813
by: Ole Nielsby | last post by:
How does the GetHashCode() of an array object behave? Does it combine the GetHashCode() of its elements, or does it create a sync block for the object? I want to use readonly arrays as dictionary keys, based on their content, not their identity. Is this feasible using the arrays directly, or do I need to wrap them in a struct that...
8
4566
by: Maya | last post by:
Hello all, I'm using MD5 hashing in my application to give unique values to huge list of items my application receives, originally every item's name was difficult to use as an id for this item although its unique but because it had certain characters and variable lengths I ended up using MD5 hashing of the name.
6
2249
by: Jayender | last post by:
Hi, What is the difference between Hashing and Encryption ?
0
1350
by: s.phonologies | last post by:
Hi friends, I am Sumit problem in C Language I have created a program to store int data by the HASH() my hash function for generate hashkey: int HASH(data) { return data%10;
15
2989
by: Vinodh | last post by:
I am reading about hashing techniques. The map data structure available in C++ STL uses hashing techniques?
0
7561
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7761
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. ...
0
7999
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...
1
7520
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...
0
7845
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...
1
5403
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3532
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1978
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
1
1094
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.