From a34659f62ca7a7aa1c74d4b66895d94891884752 Mon Sep 17 00:00:00 2001 From: Faris CHTATOU Date: Mon, 16 Jan 2023 22:38:39 +0100 Subject: [PATCH] update go package --- go.mod | 2 +- graph/main.go | 6 ++++-- main.go | 4 ++-- tree/bst.go | 5 +++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index b7fc12e..ad07db1 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module ds +module github.com/farischt/ds go 1.19 diff --git a/graph/main.go b/graph/main.go index f9a58c1..12937e6 100644 --- a/graph/main.go +++ b/graph/main.go @@ -1,9 +1,10 @@ package graph import ( - "ds/queue" - "ds/stack" "fmt" + + "github.com/farischt/ds/queue" + "github.com/farischt/ds/stack" ) type IGraph[T comparable] interface { @@ -215,6 +216,7 @@ func (g *Graph[T]) LargestComponentSize() int { return maxSize } +// Type element used to store the node and the distance from the source. type Element[T any] struct { node T distance int diff --git a/main.go b/main.go index 4f4e62c..937fcfd 100644 --- a/main.go +++ b/main.go @@ -1,10 +1,10 @@ -package main +package ds import ( "fmt" ) -func main() { +func Main() { fmt.Println(` ██╗ ██╗███████╗██╗ ██████╗ ██████╗ ███╗ ███╗███████╗ ████████╗ ██████╗ ██║ ██║██╔════╝██║ ██╔════╝██╔═══██╗████╗ ████║██╔════╝ ╚══██╔══╝██╔═══██╗ diff --git a/tree/bst.go b/tree/bst.go index 37aba67..0d6b2a6 100644 --- a/tree/bst.go +++ b/tree/bst.go @@ -1,9 +1,10 @@ package tree import ( - "ds/queue" - "ds/stack" "fmt" + + "github.com/farischt/ds/queue" + "github.com/farischt/ds/stack" ) type IBinarySearchTree interface {