make use of graph factory function.

move isLoop logic into guard clause.
This commit is contained in:
2024-12-06 22:23:01 +00:00
parent 8bf3f603d5
commit 08706ecc11
4 changed files with 9 additions and 11 deletions

View File

@@ -7,8 +7,8 @@ import (
)
type graph struct {
data []string
startPoint point
data []string
}
func newGraph() *graph {