Ejemplo n.º 1
0
linkedlistNode *findCircular(linkedlistNode *head) {
    linkedlistNode *T = head;
    while (T) {
        if (Table.find(T->value) == Table.end()) {
            Table[T->value] = T;
        }
        else {
            return Table[T->value];
        }
        T = T->next;
    }
    cout<<"Circular does not exist"<<endl;
    return 0;
}
Ejemplo n.º 2
0
int main()
{
    const __gnu_cxx::hash_map<int,int> t;
    return t.find(5) == t.end();
}