Consider a standard binary min-heap holding n nodes. No partial credit for part B unless the complexity is as requested. Part B is similar in spirit, except that we need to visit possible candidate nodes in order. This is achieved by placing these candidate nodes in a priority queue Q implemented as a binary heap. Question 3 Suffix trees.
Spaces are characters.
Alternatively, induction could be attempted. In the suffix tree, edges are compacted. There should be n leaves, one per input symbol.