Dynamic programmingExplained
Maximum Path Sum
Best path in a tree or triangle by combining best child paths.
Time
O(n)
Extra space
O(h)
Use it for
Path optimisation.
Best path in a tree or triangle by combining best child paths.
Time
O(n)
Extra space
O(h)
Use it for
Path optimisation.