Lenght of LL recursively

 


int length(Node *head) {

    // Write your code here

    if(head==NULL){

        return 0;

    }

    return 1+length(head->next);

}

Comments

Popular posts from this blog

Sum of Even Numbers till N

Find the Runner-Up Score!

Print All Substrings