473,385 Members | 1,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 DynamicHashTable
{
char symbol[1];
struct DynamicHashTable *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 4377
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 DynamicHashTable
{
char symbol[1];
struct DynamicHashTable *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.programming, perhaps).
Nov 13 '07 #2

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

Similar topics

2
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
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...
11
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...
10
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...
19
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...
8
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...
6
by: Jayender | last post by:
Hi, What is the difference between Hashing and Encryption ?
0
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
by: Vinodh | last post by:
I am reading about hashing techniques. The map data structure available in C++ STL uses hashing techniques?
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.