shikhil gupta
BAN USERhey dude...how will u remove the collision when two different key will have same hash key?
#include <stdio.h>
#include <stdlib.h>
void search_index(int *);
int main()
{
int a[]={10,5,6,13,8,2,25,15,35};
search_index(a);
return 0;
}
void search_index(int * a)
{
int i;
int first,second,third;
first=second=third=0;
for(i=1;i<9;i++)
{
if(a[i]>a[first] && first<i)
{
first=i;
}
else
{
if(a[first]>a[second] && second<first)
{
second=i;
}
else
{
if(a[second]>a[third] && third<second)
third=i;
}
}
}
printf("%d %d %d\n",third,second,first);
printf("%d %d %d",a[third],a[second],a[first]);
}
can u explain how mapping is working?
- shikhil gupta December 28, 2012