From 70967fb9e811841edb8734033583502a6af536dd Mon Sep 17 00:00:00 2001 From: ia7ck <23146842+ia7ck@users.noreply.github.com> Date: Wed, 23 Oct 2024 13:49:42 +0900 Subject: [PATCH] =?UTF-8?q?n=3D1=E3=81=AE=E6=9C=A8=E3=82=92=E7=94=9F?= =?UTF-8?q?=E6=88=90=E3=81=99=E3=82=8B=E5=87=A6=E7=90=86=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/graph/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/graph/page.tsx b/app/graph/page.tsx index 0807141..4922db0 100644 --- a/app/graph/page.tsx +++ b/app/graph/page.tsx @@ -74,7 +74,7 @@ export default function Graph() { for (let i = 0; i < n - 2; i++) { code.push(getRandomInt(0, n)); } - const treeEdges = n === 0 ? [] : pruferDecode(code); + const treeEdges = n === TREE_SIZE_MIN ? [] : pruferDecode(code); const edges = treeEdges.map(([from, to]) => { if (indexing === "1-indexed") { return { from: from + 1, to: to + 1 };