From aef2dc6159706a736a21af7ce9362cb234f46f10 Mon Sep 17 00:00:00 2001 From: Logiar Date: Wed, 11 Dec 2024 19:42:02 +0100 Subject: [PATCH] Decrease runtime by increasing cache size. --- day11.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/day11.kts b/day11.kts index dfec33f..1c930ed 100755 --- a/day11.kts +++ b/day11.kts @@ -26,7 +26,7 @@ class PriorityCache(private val maxSize: Int) { return cache.containsKey(key) } } -val priorityCache = PriorityCache(20000) +val priorityCache = PriorityCache(50000) fun getStonesAfter(input: List,iterations: Int, cache: PriorityCache): Long { var sum = 0L for (i in input) {