Hi all,
I want to implement a sort of hash table in C. I have an array which stores 4 different characters at different positions. I need to make the 4 characters the key and their positions the value in hash table. Like shown below.
int arr[1000] = {a, a, t, g, t , t, a, c, c, g, a, t, g, c }
My hash will be like this:
a: 0, 1, 6, 10
c: 7, 8, 13
g: 3, 9, 12
t: 2, 4, 5, 11
Can anyone help me that which data structures to use. arr is going to contain DNA sequences so any data structures suggested will have to be allocated emory dynamically.
I want to implement a sort of hash table in C. I have an array which stores 4 different characters at different positions. I need to make the 4 characters the key and their positions the value in hash table. Like shown below.
int arr[1000] = {a, a, t, g, t , t, a, c, c, g, a, t, g, c }
My hash will be like this:
a: 0, 1, 6, 10
c: 7, 8, 13
g: 3, 9, 12
t: 2, 4, 5, 11
Can anyone help me that which data structures to use. arr is going to contain DNA sequences so any data structures suggested will have to be allocated emory dynamically.