jweinst1
3/12/2020 - 3:17 AM

find function of a DNA node

find function of a DNA node

long DNANode::find(const DNA::Base* dna, size_t size)
{
    if (!size)
        return count;
    DNANode* nextNode = childNodes[*dna];
    if (nextNode == nullptr)
        return -1;
    else
        return nextNode->find(dna + 1, size - 1);
}