The cost of a tree search grows fast: each step multiplies the number of thoughts by the branching factor. Counting the thoughts makes that cost explicit, which is why the beam and pruning exist.
Implement total_thoughts(b, depth), the total number of thoughts generated by a full breadth search.
Sum the powers of the branching factor from one to the depth.
No results yet
Run your code to check it against the examples, or submit to run every test.