https://github.com/talentedandrew/go-linkedlist
Implementation of linked list in Go.
https://github.com/talentedandrew/go-linkedlist
data-structures go golang linked-list
Last synced: about 1 year ago
JSON representation
Implementation of linked list in Go.
- Host: GitHub
- URL: https://github.com/talentedandrew/go-linkedlist
- Owner: talentedandrew
- Created: 2018-06-26T17:57:12.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-26T18:03:15.000Z (almost 8 years ago)
- Last Synced: 2025-02-03T10:14:32.143Z (about 1 year ago)
- Topics: data-structures, go, golang, linked-list
- Language: Go
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Go : Linked Lists
An implementation of singly Linked List in Go.
Consider a feed (as in twitter) of posts, where each post consists of some data and time and a pointer to the next post.
So our `Post` would look like :
```go
type Post struct {
body string
publishDate int64 // Unix timestamp
next *Post // link to the next Post
}
```
And, so our `Feed` would look like :
```go
type Feed struct {
length int // we'll use it later
start *Post
end *Post
}
```
[Inspired from Ilija Eftimov](https://ieftimov.com/golang-datastructures-linked-lists). You can get here a more detailed and a beautiful explaination of this.