Module dpss::dp

source · []
Expand description

This is a module for dynamic programming.

Functions

Finds subsets sum of a target value. It can accept negative values.

Finds subsets sum of a target value. It can’t accept negative values but relatively faster.

Finds the integers from two vectors that sum to the same value. This method assumes that the two vectors have One-to-Many relationships. Each integer of the key vector corresponds to the multiple integers of the value vector.

Finds the integers from two vectors that sum to the same value. This method assumes that the two vectors have Many-to-Many relationships. Each integer of the arr1 vector corresponds to the multiple integers of the arr2 vector. With this method, we can find multiple combinations of the integers.