Calls times work.
transcript
A call scans n items. Then it calls itself. The cost depends on how.
One call on n minus one costs five hundred twenty-four thousand. One call on half costs two thousand. Two calls on halves cost eleven thousand.
A chain has n levels. The work adds up to n squared over two. Halving has few levels, so the work stops at two n. Two halves do n a level, with log n levels. The tree tells you which one you have.
Level one: one call of eight. Level two: two calls of four. Level three: four calls of two. Each level does eight units.
Count the calls on a level. Multiply by the work of one call. Add the levels. Four levels of eight make thirty-two.
Do not multiply the root's work by the calls. Eight times fifteen is one hundred twenty. The real total is thirty-two.
The shape of the tree decides the cost. Full breakdown in the lecture.