mirror of
https://github.com/Threnklyn/advent-of-code-go.git
synced 2026-05-18 19:13:27 +02:00
resolve some TODOs
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
// TODO: pull combinations, multiplying a slice of ints, into algos and mathy packages?
|
||||
package main
|
||||
|
||||
import (
|
||||
|
||||
+1
-2
@@ -47,8 +47,7 @@ func spinlock(input string, part int) int {
|
||||
}
|
||||
current = current.next
|
||||
|
||||
// progress log for part 2 brute force...
|
||||
// todo optimize this slow pos
|
||||
// progress log for part 2 brute force... this is SLOW
|
||||
if i%1000000 == 0 {
|
||||
log.Println(i, "steps done")
|
||||
}
|
||||
|
||||
@@ -260,7 +260,6 @@ func (graph *Graph) dfsMinmumDistance() int {
|
||||
// helper function to generate a cache string key
|
||||
// cache string is of the form entryKey:allKeysToFind
|
||||
func makeCacheKey(entry string, keysFound map[string]bool, totalKeys int) string {
|
||||
// TODO: move this into the graph? to avoid making it 910238190382 times
|
||||
allKeys := make([]string, totalKeys)
|
||||
for i := 0; i < totalKeys; i++ {
|
||||
allKeys[i] = cast.ASCIIIntToChar(int('a') + i)
|
||||
|
||||
Reference in New Issue
Block a user