The total number of subtrees is no greater than L 3 , because the level of a subtree is less than L, and for the children of each node, there are at most L 2 subsequences of siblings.
the time complexity for subtree extraction is O(L 3 ).