File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/main/java/com/thealgorithms/dynamicprogramming Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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 ++) {
You can’t perform that action at this time.
0 commit comments