Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
varun7654 committed Apr 1, 2024
1 parent 9fcb212 commit 60b56d6
Show file tree
Hide file tree
Showing 19 changed files with 76 additions and 41 deletions.
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>WeCode</title><script defer="defer" src="/static/js/main.7cc81925.js"></script><link href="/static/css/main.b49bfbb5.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>WeCode</title><script defer="defer" src="/static/js/main.4c6577d5.js"></script><link href="/static/css/main.30a66e5a.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
20 changes: 10 additions & 10 deletions asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"files": {
"main.css": "/static/css/main.b49bfbb5.css",
"main.js": "/static/js/main.7cc81925.js",
"main.css": "/static/css/main.30a66e5a.css",
"main.js": "/static/js/main.4c6577d5.js",
"static/js/488.a8d036df.chunk.js": "/static/js/488.a8d036df.chunk.js",
"static/js/780.b4e93c13.chunk.js": "/static/js/780.b4e93c13.chunk.js",
"static/js/802.ad7e52f6.chunk.js": "/static/js/802.ad7e52f6.chunk.js",
"static/js/780.b463502c.chunk.js": "/static/js/780.b463502c.chunk.js",
"static/js/369.fd33c645.chunk.js": "/static/js/369.fd33c645.chunk.js",
"static/media/KaTeX_AMS-Regular.ttf": "/static/media/KaTeX_AMS-Regular.853be92419a6c3766b9a.ttf",
"static/media/KaTeX_Main-Regular.ttf": "/static/media/KaTeX_Main-Regular.9eba1d77abcf2aa6e94e.ttf",
"static/media/KaTeX_Main-Bold.ttf": "/static/media/KaTeX_Main-Bold.8169508bf58f8bd92ad8.ttf",
Expand Down Expand Up @@ -67,14 +67,14 @@
"static/media/KaTeX_Size3-Regular.woff2": "/static/media/KaTeX_Size3-Regular.e1951519f6f0596f7356.woff2",
"static/media/github-mark-white.svg": "/static/media/github-mark-white.ac7f5ce28096dc43a49cbedeabffa77b.svg",
"index.html": "/index.html",
"main.b49bfbb5.css.map": "/static/css/main.b49bfbb5.css.map",
"main.7cc81925.js.map": "/static/js/main.7cc81925.js.map",
"main.30a66e5a.css.map": "/static/css/main.30a66e5a.css.map",
"main.4c6577d5.js.map": "/static/js/main.4c6577d5.js.map",
"488.a8d036df.chunk.js.map": "/static/js/488.a8d036df.chunk.js.map",
"780.b4e93c13.chunk.js.map": "/static/js/780.b4e93c13.chunk.js.map",
"802.ad7e52f6.chunk.js.map": "/static/js/802.ad7e52f6.chunk.js.map"
"780.b463502c.chunk.js.map": "/static/js/780.b463502c.chunk.js.map",
"369.fd33c645.chunk.js.map": "/static/js/369.fd33c645.chunk.js.map"
},
"entrypoints": [
"static/css/main.b49bfbb5.css",
"static/js/main.7cc81925.js"
"static/css/main.30a66e5a.css",
"static/js/main.4c6577d5.js"
]
}
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>WeCode</title><script defer="defer" src="/static/js/main.7cc81925.js"></script><link href="/static/css/main.b49bfbb5.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>WeCode</title><script defer="defer" src="/static/js/main.4c6577d5.js"></script><link href="/static/css/main.30a66e5a.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
57 changes: 46 additions & 11 deletions problems/hard/dynamic.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,45 +56,65 @@ function knapsackProblem(items, maxWeight) {
# Test Cases

```javascript

// Test case 1
let items1 = [
{weight: 10, value: 60},
{weight: 20, value: 100},
{weight: 30, value: 120}
];
let maxWeight1 = 50;
knapsackProblem(items1, maxWeight1); // Expected output: 220
knapsackProblem(items1, maxWeight1);
```

displayas = knapsackProblem(items1, maxWeight1);
displayas = knapsackProblem(items1, maxWeight1)

items1 = [
{weight: 10, value: 60},
{weight: 20, value: 100},
{weight: 30, value: 120}
];

maxWeight1 = 50

```javascript
// Test case 2
let items2 = [
{weight: 5, value: 30},
{weight: 10, value: 50},
{weight: 15, value: 70}
];
let maxWeight2 = 20;
knapsackProblem(items2, maxWeight2); // Expected output: 100
knapsackProblem(items2, maxWeight2);
```

displayas = knapsackProblem(items2, maxWeight2);
displayas = knapsackProblem(items2, maxWeight2)

items2 = [
{weight: 5, value: 30},
{weight: 10, value: 50},
{weight: 15, value: 70}
];

maxWeight2 = 20

```javascript
// Test case 3
let items3 = [
{weight: 1, value: 1},
{weight: 2, value: 2},
{weight: 3, value: 3}
];
let maxWeight3 = 2;
knapsackProblem(items3, maxWeight3); // Expected output: 3
knapsackProblem(items3, maxWeight3);
```

displayas = knapsackProblem(items3, maxWeight3);

items3 = [
{weight: 1, value: 1},
{weight: 2, value: 2},
{weight: 3, value: 3}
]

maxWeight3 = 2

# Hidden Test Cases

```javascript
Expand All @@ -104,23 +124,38 @@ let hiddenItems1 = [
{weight: 4, value: 5}
];
let hiddenMaxWeight1 = 5;
knapsackProblem(hiddenItems1, hiddenMaxWeight1); // Expected output: 7
knapsackProblem(hiddenItems1, hiddenMaxWeight1);
```

displayas = knapsackProblem(hiddenItems1, hiddenMaxWeight1);

hiddenItems1 = [
{weight: 2, value: 3},
{weight: 3, value: 4},
{weight: 4, value: 5}
];

hiddenMaxWeight1 = 5;

```javascript
let hiddenItems2 = [
{weight: 1, value: 10},
{weight: 2, value: 20},
{weight: 3, value: 30}
];
let hiddenMaxWeight2 = 4;
knapsackProblem(hiddenItems2, hiddenMaxWeight2); // Expected output: 40
knapsackProblem(hiddenItems2, hiddenMaxWeight2);
```

displayas = knapsackProblem(hiddenItems2, hiddenMaxWeight2);

hiddenItems2 = [
{weight: 1, value: 10},
{weight: 2, value: 20},
{weight: 3, value: 30}
];
hiddenMaxWeight2 = 4;

# Next

# Tags
Expand Down
6 changes: 6 additions & 0 deletions static/css/main.30a66e5a.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions static/css/main.30a66e5a.css.map

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions static/css/main.b49bfbb5.css

This file was deleted.

1 change: 0 additions & 1 deletion static/css/main.b49bfbb5.css.map

This file was deleted.

3 changes: 3 additions & 0 deletions static/js/369.fd33c645.chunk.js

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions static/js/369.fd33c645.chunk.js.map

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions static/js/780.b463502c.chunk.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion static/js/780.b4e93c13.chunk.js.map

This file was deleted.

3 changes: 0 additions & 3 deletions static/js/802.ad7e52f6.chunk.js

This file was deleted.

1 change: 0 additions & 1 deletion static/js/802.ad7e52f6.chunk.js.map

This file was deleted.

6 changes: 3 additions & 3 deletions static/js/main.7cc81925.js → static/js/main.4c6577d5.js

Large diffs are not rendered by default.

File renamed without changes.

Large diffs are not rendered by default.

0 comments on commit 60b56d6

Please sign in to comment.