File tree 1 file changed +2
-2
lines changed
src/main/java/com/thealgorithms/dynamicprogramming 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -25,11 +25,11 @@ private AllConstruct() {
25
25
* Space Complexity: O(n * m) due to the size of the table storing combinations.
26
26
*
27
27
* @param target The target string to construct.
28
- * @param wordBank A list of substrings that can be used to construct the target.
28
+ * @param wordBank An iterable collection of substrings that can be used to construct the target.
29
29
* @return A list of lists, where each inner list represents one possible
30
30
* way of constructing the target string using the given word bank.
31
31
*/
32
- public static List <List <String >> allConstruct (String target , List <String > wordBank ) {
32
+ public static List <List <String >> allConstruct (String target , Iterable <String > wordBank ) {
33
33
List <List <List <String >>> table = new ArrayList <>(target .length () + 1 );
34
34
35
35
for (int i = 0 ; i <= target .length (); i ++) {
You can’t perform that action at this time.
0 commit comments