MrDudeMan
Lifer
I have an array 1,167,501 members long, each with a pointer to 8 characters, effectively being array[1167501][8].
I need to check to see if any of the 1167501 members contain the same 8 characters verbatim.
I am reading in a DNA pattern from a file, i.e. GCTGACGA. If any of them are the same, I need to know the position of the duplicate.
Is the fastest way to do this just to read the 8 characters from position 0, then check them against the 8 in position 1-1167501, increment to position 1 and check 0 and 2-1167501?
I can't sort the list, so normal searching algorithms won't work.
I need to check to see if any of the 1167501 members contain the same 8 characters verbatim.
I am reading in a DNA pattern from a file, i.e. GCTGACGA. If any of them are the same, I need to know the position of the duplicate.
Is the fastest way to do this just to read the 8 characters from position 0, then check them against the 8 in position 1-1167501, increment to position 1 and check 0 and 2-1167501?
I can't sort the list, so normal searching algorithms won't work.