dynamic programming (DP)
RU: динамическое программирование (ДП)
A technique that solves a problem by breaking it into overlapping subproblems and storing each answer so it is computed once. In tree DP, a recursive function on a tree returns extra information per subtree (for example height plus a result), solving two problems in one pass.