diff --git a/src/components/landing-page/ProblemChooser.tsx b/src/components/landing-page/ProblemChooser.tsx index 086f673..53e2f12 100644 --- a/src/components/landing-page/ProblemChooser.tsx +++ b/src/components/landing-page/ProblemChooser.tsx @@ -57,5 +57,14 @@ export const ProblemChooser = (props: GridProps) => ( description="Given a list of cities and the distances between them, find the shortest possible route that visits each city exactly once and returns to the origin city." /> + + + ); diff --git a/src/pages/solve/Knapsack.tsx b/src/pages/solve/Knapsack.tsx new file mode 100644 index 0000000..9c28836 --- /dev/null +++ b/src/pages/solve/Knapsack.tsx @@ -0,0 +1,45 @@ +import { Heading, Link, Text } from "@chakra-ui/react"; +import { NextPage } from "next"; +import { useState } from "react"; +import { Layout } from "../../components/layout/Layout"; +import { SolverConfiguration } from "../../components/solvers/SolverConfiguration"; +import { TextInputMask } from "../../components/solvers/TextInputMask"; + +const Knapsack: NextPage = () => { + const [knapsackProblem, setKnapsackProblem] = useState(""); + + return ( + + Knapsack Solver + + + In the 0-1 knapsack problem, we are given a list of items, each with a + weight and a value, and the maximum weight that the knapsack can hold. + The goal is to find the subset of items that maximizes the total value + while keeping the total weight below the maximum weight. Example + problems and an explanation of the input format can be found{" "} + + here + + . + + + + + + + ); +}; + +export default Knapsack;