Skip to content

Commit 83c14af

Browse files
committed
Fix
1 parent d7b6b8d commit 83c14af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/thealgorithms/dynamicprogramming/AllConstruct.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ private AllConstruct() {
2525
* Space Complexity: O(n * m) due to the size of the table storing combinations.
2626
*
2727
* @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.
2929
* @return A list of lists, where each inner list represents one possible
3030
* way of constructing the target string using the given word bank.
3131
*/
32-
public static List<List<String>> allConstruct(String target, List<String> wordBank) {
32+
public static List<List<String>> allConstruct(String target, Iterable<String> wordBank) {
3333
List<List<List<String>>> table = new ArrayList<>(target.length() + 1);
3434

3535
for (int i = 0; i <= target.length(); i++) {

0 commit comments

Comments
 (0)