# unival

1개의 포스트
post-thumbnail

[daily coding problem] Counting Unival Subtrees

Time: O(n^2), cuz every time check if root is a unival tree, need to evalueate subtreesSpace: O(1)Better solutionwhat if count unival tree from each l

2021년 2월 13일
·
0개의 댓글
·