Skip to content

Commit 3e179dc

Browse files
run scalaFmtAll
1 parent 26ca371 commit 3e179dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/scala/algorithms/dynamic/BackpackWeight.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ package algorithms.dynamic
1111
/// - Base Case: dp(0) = true (the empty subset)
1212
/// - For each item weight and for each w from W down to that weight:
1313
/// if dp(w - weight) is true then dp(w) becomes true.
14-
///
14+
///
1515
/// Time Complexity: O(n * W), where n is the number of items and W is the capacity.
1616
def maxReachableWeight(weights: Array[Int], W: Int): (Int, Array[Boolean]) = {
1717
// Initialize DP array: only 0 is reachable at the start.

0 commit comments

Comments
 (0)