
894. All Possible Full Binary Trees
·
Algorithm
All Possible Full Binary Trees - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 트리를 구성하는 노드 개수가 정수로 주어진다. 주어진 노드 개수를 전부 소비해서 만들 수 있는 가능한 모든 포화 이진트리(full-binary tree)를 반환하는 문제다. 물론 중복은 제외한다. 여기서 말하는 중복이란 동일한 모양을 가진 포화 이진트리를 말한다. 여기서 포인트는 가짓수를 반환하는 게 아니다. 실제로 트리를 반환해야 한다. 위의 예시 같은 경..