blob: 86624c74bb47d70dc449246cdedeb7642100c974 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
class KnapsackTest {
@Test
void test() {
int[] w = { 1, 4, 8 };
int W = 10;
assertEquals(9, Knapsack.optimalWeight(W, w));
}
}
|