BinaryTrees icon indicating copy to clipboard operation
BinaryTrees copied to clipboard

MJLevelOrderPrinter 删除所有的null时有bug

Open DHLau opened this issue 5 years ago • 0 comments

问题代码:

[rowNodes removeObject:[NSNull null]];

可以修改为

NSMutableArray *array = rowNodes.mutableCopy;
        for (id data in array) {
            if ([data isKindOfClass:[NSNull class]]) {
                [rowNodes removeObject:data];
            }
        }

DHLau avatar Dec 09 '20 02:12 DHLau