it is better to use NestedInteger as parameter.


  • 0
    J

    as the title.
    do you agree with me.

    otherwise, your will have duplicate code as below:

    public int *** (List<NestedInteger> list) {
    int res=0;
    for(NestedInteger ni: list) {
    res+=helper(ni,0);
    }
    }
    public in
    }


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.