Was talking with a software developer regarding how to determining the max path of a pyramid. We discussed a solution but it is nice to see it come to live.
The following figure illustrates the structure of the pyramid:
The requirements are that the height be in the range 1 <= height <= 25. The tree is complete. There are no missing nodes. That implies that the base contains leaf nodes (no children). The values for the nodes should arbitrarily be in the range 1 <= val <= 100. Continue reading “Pyramid Max Path”