← Questions

Kth largest perfect binary subtree

0
AmazonCodingLast asked Jun 2026

In a binary tree, find every subtree that is a perfect binary tree and return the size of the kth largest.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding