diff --git a/datastructure/hashmap/hashmap.go b/datastructure/hashmap/hashmap.go index 464cb38..d46e298 100644 --- a/datastructure/hashmap/hashmap.go +++ b/datastructure/hashmap/hashmap.go @@ -1,7 +1,7 @@ // Copyright 2021 dudaodong@gmail.com. All rights reserved. // Use of this source code is governed by MIT license -// Package datastructure implements some data structure. eg. list, linklist, stack, queue, tree, graph. +// Package datastructure implements some data structure. hashmap structure. package datastructure import ( diff --git a/datastructure/heap/maxheap.go b/datastructure/heap/maxheap.go index 1fa56cc..e496e14 100644 --- a/datastructure/heap/maxheap.go +++ b/datastructure/heap/maxheap.go @@ -1,7 +1,7 @@ // Copyright 2021 dudaodong@gmail.com. All rights reserved. // Use of this source code is governed by MIT license -// Package datastructure implements some data structure. eg. list, linklist, stack, queue, tree, graph. +// Package datastructure implements some data structure. MaxHeap is a binary max heap. package datastructure import ( diff --git a/datastructure/link/doublylink.go b/datastructure/link/doublylink.go index 173e6a3..4e56643 100644 --- a/datastructure/link/doublylink.go +++ b/datastructure/link/doublylink.go @@ -1,3 +1,7 @@ +// Copyright 2021 dudaodong@gmail.com. All rights reserved. +// Use of this source code is governed by MIT license + +// Package datastructure contains some data structure. Link structure contains SinglyLink and DoublyLink. package datastructure import ( diff --git a/datastructure/link/singlylink.go b/datastructure/link/singlylink.go index 1b26632..401325a 100644 --- a/datastructure/link/singlylink.go +++ b/datastructure/link/singlylink.go @@ -1,3 +1,7 @@ +// Copyright 2021 dudaodong@gmail.com. All rights reserved. +// Use of this source code is governed by MIT license + +// Package datastructure contains some data structure. Link structure contains SinglyLink and DoublyLink. package datastructure import ( diff --git a/datastructure/list/list.go b/datastructure/list/list.go index 97556df..2a359e4 100644 --- a/datastructure/list/list.go +++ b/datastructure/list/list.go @@ -1,7 +1,7 @@ // Copyright 2021 dudaodong@gmail.com. All rights reserved. // Use of this source code is governed by MIT license -// Package datastructure implements some data structure. eg. list, linklist, stack, queue, tree, graph. +// Package datastructure contains some data structure. list is a linear table, implemented with slice. package datastructure import ( diff --git a/datastructure/node.go b/datastructure/node.go index 0910cef..ed24a83 100644 --- a/datastructure/node.go +++ b/datastructure/node.go @@ -1,7 +1,7 @@ // Copyright 2021 dudaodong@gmail.com. All rights reserved. // Use of this source code is governed by MIT license -// Package datastructure implements some data structure. eg. list, linklist, stack, queue, tree, graph. +// Package datastructure implements some data structure. package datastructure // LinkNode is a linkedlist node, which have a Value and Pre points to previous node, Next points to a next node of the link. diff --git a/datastructure/queue/arrayqueue.go b/datastructure/queue/arrayqueue.go index 27079b4..fd5d13d 100644 --- a/datastructure/queue/arrayqueue.go +++ b/datastructure/queue/arrayqueue.go @@ -1,3 +1,8 @@ +// Copyright 2021 dudaodong@gmail.com. All rights reserved. +// Use of this source code is governed by MIT license + +// Package datastructure contains some data structure. +// Queue structure contains ArrayQueue, LinkedQueue, CircularQueue, and PriorityQueue. package datastructure import ( diff --git a/datastructure/queue/circularqueue.go b/datastructure/queue/circularqueue.go index 53f655e..b33ba55 100644 --- a/datastructure/queue/circularqueue.go +++ b/datastructure/queue/circularqueue.go @@ -1,3 +1,8 @@ +// Copyright 2021 dudaodong@gmail.com. All rights reserved. +// Use of this source code is governed by MIT license + +// Package datastructure contains some data structure. +// Queue structure contains ArrayQueue, LinkedQueue, CircularQueue, and PriorityQueue. package datastructure import ( diff --git a/datastructure/queue/linkedqueue.go b/datastructure/queue/linkedqueue.go index 8e4f90d..d44cfd7 100644 --- a/datastructure/queue/linkedqueue.go +++ b/datastructure/queue/linkedqueue.go @@ -1,3 +1,8 @@ +// Copyright 2021 dudaodong@gmail.com. All rights reserved. +// Use of this source code is governed by MIT license + +// Package datastructure contains some data structure. +// Queue structure contains ArrayQueue, LinkedQueue, CircularQueue, and PriorityQueue. package datastructure import ( diff --git a/datastructure/queue/priorityqueue.go b/datastructure/queue/priorityqueue.go index 9875486..741ec9a 100644 --- a/datastructure/queue/priorityqueue.go +++ b/datastructure/queue/priorityqueue.go @@ -1,3 +1,8 @@ +// Copyright 2021 dudaodong@gmail.com. All rights reserved. +// Use of this source code is governed by MIT license + +// Package datastructure contains some data structure. +// Queue structure contains ArrayQueue, LinkedQueue, CircularQueue, and PriorityQueue. package datastructure import ( diff --git a/datastructure/set/set.go b/datastructure/set/set.go index 60326dd..186d905 100644 --- a/datastructure/set/set.go +++ b/datastructure/set/set.go @@ -1,6 +1,10 @@ +// Copyright 2021 dudaodong@gmail.com. All rights reserved. +// Use of this source code is governed by MIT license + +// Package datastructure contains some data structure. Set is a data container, like slice, but element of set is not duplicate. package datastructure -// Set is a data container, like slice, but element of set is not duplicate +// Set is a data container, like slice, but element of set is not duplicate. type Set[T comparable] map[T]struct{} // NewSet return a instance of set diff --git a/datastructure/stack/arraystack.go b/datastructure/stack/arraystack.go index 3b546fd..b0cbe88 100644 --- a/datastructure/stack/arraystack.go +++ b/datastructure/stack/arraystack.go @@ -1,3 +1,7 @@ +// Copyright 2021 dudaodong@gmail.com. All rights reserved. +// Use of this source code is governed by MIT license + +// Package datastructure contains some data structure. Stack structure contains ArrayStack and LinkedStack. package datastructure import "errors" diff --git a/datastructure/stack/linkedstack.go b/datastructure/stack/linkedstack.go index fb57a4c..af17846 100644 --- a/datastructure/stack/linkedstack.go +++ b/datastructure/stack/linkedstack.go @@ -1,3 +1,7 @@ +// Copyright 2021 dudaodong@gmail.com. All rights reserved. +// Use of this source code is governed by MIT license + +// Package datastructure contains some data structure. Stack structure contains ArrayStack and LinkedStack. package datastructure import ( diff --git a/datastructure/tree/bstree.go b/datastructure/tree/bstree.go index 2a3fa41..db9618b 100644 --- a/datastructure/tree/bstree.go +++ b/datastructure/tree/bstree.go @@ -1,3 +1,7 @@ +// Copyright 2021 dudaodong@gmail.com. All rights reserved. +// Use of this source code is governed by MIT license + +// Package datastructure contains some data structure. BSTree is binary search tree. package datastructure import (