Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
247 B
2
Indexable
Never
    LINKEDLIST_goToHead(list);
    int index = -1;
    int i = 0;

    for(i = 0; !LINKEDLIST_isAtEnd(list); i++) {
        if(LINKEDLIST_get(list) == cual) {
            index = i;
        }
        LINKEDLIST_next(list);
    }

    return index;