PROGRAM TO IMPLEMENT HASHING USING OPEN ADDRESSING IN C

DATA STRUCTURES PROGRAMS

PROGRAM TO IMPLEMENT HASHING USING OPEN ADDRESSING USING C



#include<STDIO.H>
void main()
{
int a[10]={1,2,3,4,5,6,7,8,9,10};
int n,value;
int temp, hash;
clrscr();
printf(“\nEnter the value of n(table size):”);
scanf(“%d”,&n);
do
{
printf(“\nEnter the hash value”);
scanf(“%d”,&value);
hash=value%n;
if(a[hash]==0)
{
a[hash]=value;
printf(“\na[%d]the value %d is stored”,hash,value);
}
else
{
for(hash++;hash<n;hash++)
{
if(a[hash]==0)
{
printf("Space is allocated give other value");
a[hash]=value;
printf("\n a[%d]the value %d is stored",hash,value);
goto menu;
}
}
hash=0;
for(hash;hash<n;hash++)
{
if(a[hash]==0)
{
printf("Space is allocated give other value");
a[hash]=value;
printf("\n a[%d]the value %d is stored",hash,value);
goto menu;
}
}
printf(“ERROR”);
printf("\nEnter '0' and press 'Enter key' twice to exit");

}

menu:

printf("\n Do u want enter more");

scanf("%d",&temp);

}

while(temp==1);

getch();

}

Data structures Programs in c


MULTIPLICATION OF TWO MATRICES
PRINT TRANSPOSE OF A MATRIX

PROGRAM TO PRINT IN LEXICOGRAPHIC ORDER
PROGRAM FIND SUB STRING  &
ITS POSITION
PROGRAM TO CONCATENATE STRINGS
PROGRAM TO FIND THE STUDENT INFORMATION & PRINT RANK SECURED IN ASCENDING ORDER.
PROGRAM TO MULTIPLY TWO SPARCE MATRICES
PROGRAM TO FIND OCCURRENCES OF STRING IN PARAGRAPH PROGRAM TO REVERSE  STRING
PROGRAM TO CONVERT A PREFIX EXPRESSION TO A POSTFIX USING POINTERS

IMPLEMENT SINGLE LINKED LIST
IMPLEMENT DOUBLE LINKED LIST

PROGRAM TO COUNT NODES IN LINEAR LINKED LIST

IMPLEMENT CIRCULAR LINKED LIST

PROGRAM TO CONCATENATE TWO LINEAR LINKED LISTS
PROGRAM PRINT A SINGLY LINKED LIST THOSE ELEMENTS ARE COMMON IN TWO LISTS
PROGRAM TO ACCEPT A SINGLY LINKED LIST OF INTEGERS & SORT THE LIST IN ASCENDING ORDER.

IMPLEMENT CIRCULAR LINKED LIST IN C

PROGRAM TO REVERSE LINKED LIST
REPRESENT POLYNOMIAL USING LINKED LIST
 ADD TWO POLYNOMIALS USING LINKED LIST

IMPLEMENT STACK USING ARRAYS

IMPLEMENT STACK USING LINKED LIST

IMPLEMENT MULTIPLE STACK IN A SINGLE ARRAY
IMPLEMENT EXPRESSION TREE USING STACKS IND ITS INORDER, PREORDER & POST ORDER TRAVERSALS
CONVERT INFIX NOTATION TO POSTFIX NOTATION USING STACKS

IMPLEMENT QUEUE USING ARRAYS
IMPLEMENT QUEUE USING POINTERS
IMPLEMENT CIRCULAR QUEUE USING ARRAYS

IMPLEMENT CIRCULAR QUEUE USING POINTERS
IMPLEMENT DEQUEUE USING ARRAYSPROGRAM TO IMPLEMENT DEQUEUE USING POINTERS
PROGRAM TO REVERSE ELEMENTS IN A QUEUE
IMPLEMENTATION OF BINARY TREE                   
PROGRAM FOR PRE-ORDER,POST-ORDER & IN-ORDER TRAVERSALS OF A BINARY TREE
PROGRAM TO COUNT NO, OF LEAVES OF BINARY TREE
IMPLEMENTATION OF B-TREE
IMPLEMENTATION OF MULTIWAY TREE IN C
IMPLEMENTATION OF AVL TREE
IMPLEMENTATION OF SPLAY TREE
IMPLEMENTATION OF RED-BLACK TREE

IMPLEMENT HASHING USING OPEN ADDRESSING

PROGRAM TO IMPLEMENT PRIORITY QUEUE USING HEAP
IMPLEMENT DIJKSTRA'S ALGORITHM 
IMPLEMENT KNAPSACK PROBLEM 
PROGRAM TO ADD & DELETE NODES FROM ADJACENCY LIST
IMPLEMENT DEPTH FIRST SEARCH
FIND MINIMAL SPANNING TREE USING KRUSKAL'S ALGORITHM
FIND MINIMAL SPANNING TREE USING  PRIMS ALGORITHM
IMPLEMENT BREADTH FIRST SEARCH
LINEAR SEARCH USING POINTERS
BINARY SEARCH USING POINTERS

LINEAR SEARCH USING ARRAYS
BINARY SEARCH USING ARRAYS

BUBBLE SORT PROGRAM USING ARRAYS

MERGE SORT PROGRAM USING ARRAYS
SELECTION SORT PROGRAM USING ARRAYS
INSERTION SORT PROGRAM USING ARRAYS
TOPOLOGICAL SORT USING ARRAYS
HEAP SORT USING ARRAYS

HEAP SORT USING POINTERS
BUBBLE SORT PROGRAM USING POINTERS



Comments