All Construct with Tabulation
Updated: 01 February 2024
Problem
The same problem as the All Construct Memoization Problem but implemented using the tabular style in the previous problems
This is almost the same as the Count Construct solution but instead of incrementing the count we define the new running combination to reach a current position while retaining all other values that have reached that position thus far
For reference see the resulting array for a certain combination:
Tabulation Implementation
The implementation of this can be seen below:
In the above, the time complexity and space complexity . While the resulting complexity is pretty bad it is the best we’re going to get for this solution since it explicitly needs a list of all possible combinations