From 35776a547009a73beb4cfcdc0e9fb16ff7e13c3d Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sat, 23 Dec 2023 11:58:21 +0000 Subject: [PATCH] upd docstrings --- day-17/one.go | 4 ++-- day-17/pqueue.go | 4 ++-- day-17/two.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/day-17/one.go b/day-17/one.go index 89f7dd7..78cfc59 100644 --- a/day-17/one.go +++ b/day-17/one.go @@ -44,7 +44,7 @@ func (d dijkstra) initialize(start coords) *pqueue { return pq } -// run performs the lowest cost dijkstra algorithm with a min heap +// run performs the lowest cost dijkstra algorithm from start to end func (d dijkstra) run(start, end coords) int { pq := d.initialize(start) @@ -101,7 +101,7 @@ func (d dijkstra) run(start, end coords) int { return 0 } -// one returns the lowest cost path from start to end +// one returns the lowest cost path for the given graph from start to end coords func one(lines []string) int { graph := buildGraph(lines) diff --git a/day-17/pqueue.go b/day-17/pqueue.go index 1040b14..64212c6 100644 --- a/day-17/pqueue.go +++ b/day-17/pqueue.go @@ -4,8 +4,8 @@ import ( "container/heap" ) -// pqueue implements the heap.Interface interface -// it represents a min heap priority queue +// pqueue represents a min priority queue +// it implements the heap.Interface interface type pqueue []*node func newPriorityQueue() *pqueue { diff --git a/day-17/two.go b/day-17/two.go index 1033134..37b5274 100644 --- a/day-17/two.go +++ b/day-17/two.go @@ -1,6 +1,6 @@ package main -// two returns the lowest cost path from start to end +// two returns the lowest cost path for a given graph from start to end coords // with a min/max distance set func two(lines []string) int { graph := buildGraph(lines)