Added docstring for DP table building function.