HASHING TECHNIQUE
Aim:
To implement a program using
Hashing technique.
Algorithm:
Step1: Include necessary header
files
Step2: Declare necessary variables
Step3: Check the value of *S
Then call Insert( )
Print “Enter the string”
Read S
Step4: Check the value of *S
Step5: Then print S by calling
hGetVal( )
Step6: Call PrintHash( )
Step7: End
Algorithm For hINSERT( ):
Step1: Allocate memory to pointer
Step4: Print “h[index]=key”
Step5: Return
Algorithm For hGETVALUE( ):
Step1:
[Ptr=h[hGetIndex(key)]]
Step3:
If[Ptr],Check the value of Ptr
Step4:
[Return -1]
Algorithm For PRINTHASH( ):