Skip to content

Commit

Permalink
doc: update package comment for datastructure package
Browse files Browse the repository at this point in the history
  • Loading branch information
duke-git committed Jun 1, 2023
1 parent cbf8cfd commit a8761ee
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 5 deletions.
2 changes: 1 addition & 1 deletion datastructure/hashmap/hashmap.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2021 [email protected]. 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 (
Expand Down
2 changes: 1 addition & 1 deletion datastructure/heap/maxheap.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2021 [email protected]. 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 (
Expand Down
4 changes: 4 additions & 0 deletions datastructure/link/doublylink.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2021 [email protected]. 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 (
Expand Down
4 changes: 4 additions & 0 deletions datastructure/link/singlylink.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2021 [email protected]. 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 (
Expand Down
2 changes: 1 addition & 1 deletion datastructure/list/list.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2021 [email protected]. 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 (
Expand Down
2 changes: 1 addition & 1 deletion datastructure/node.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2021 [email protected]. 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.
Expand Down
5 changes: 5 additions & 0 deletions datastructure/queue/arrayqueue.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright 2021 [email protected]. 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 (
Expand Down
5 changes: 5 additions & 0 deletions datastructure/queue/circularqueue.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright 2021 [email protected]. 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 (
Expand Down
5 changes: 5 additions & 0 deletions datastructure/queue/linkedqueue.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright 2021 [email protected]. 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 (
Expand Down
5 changes: 5 additions & 0 deletions datastructure/queue/priorityqueue.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright 2021 [email protected]. 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 (
Expand Down
6 changes: 5 additions & 1 deletion datastructure/set/set.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// Copyright 2021 [email protected]. 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
Expand Down
4 changes: 4 additions & 0 deletions datastructure/stack/arraystack.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2021 [email protected]. 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"
Expand Down
4 changes: 4 additions & 0 deletions datastructure/stack/linkedstack.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2021 [email protected]. 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 (
Expand Down
4 changes: 4 additions & 0 deletions datastructure/tree/bstree.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2021 [email protected]. 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 (
Expand Down

0 comments on commit a8761ee

Please sign in to comment.