Skip to main content
2 votes

What formula was used here to calculate the average search time of the binary tree?

I think I figured it out. The "average search time" described above is the sum of the number of comparisons needed to get to each node for all nodes divided by the total number of nodes. For ...
Felix An's user avatar
  • 119
1 vote

How to create a tree of height $lg(n)$ using Union-Find data structure

Use the below recursive construction: constructLogHeightTree($A$) Let $n$ be size of $A$, then: If $n=1$ return Otherwise: Split $A$ into $2$ sets $A_1$ and $A_2$ with $\lceil \frac{n}{2} \rceil$ ...
EnEm's user avatar
  • 346
1 vote

Trie minimization when order doesn't matter

Sticking to frequency count is your best bet here probably
NeedHelp's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible