Brute-force Search - More Advanced Algorithm

More Advanced Algorithm

#define EOS '\0'

void BF(char *x, int m, char *y, int n) {

char *yb; /* Searching */ for (yb = y; *y != EOS; ++y) if (memcmp(x, y, m) == 0) OUTPUT(y - yb);

}

Read more about this topic:  Brute-force Search

Famous quotes containing the word advanced:

    Knowledge is a comfortable and necessary retreat and shelter for us in an advanced age; and if we do not plant it while young, it will give us no shade when we are old.
    Philip Dormer Stanhope, 4th Earl Chesterfield (1694–1773)