https://github.com/syniol/golang-data-structures
Data Structures in Golang
https://github.com/syniol/golang-data-structures
Last synced: 10 months ago
JSON representation
Data Structures in Golang
- Host: GitHub
- URL: https://github.com/syniol/golang-data-structures
- Owner: syniol
- License: other
- Created: 2024-04-09T12:53:48.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-07T12:51:00.000Z (over 1 year ago)
- Last Synced: 2025-01-20T15:41:42.016Z (over 1 year ago)
- Language: Go
- Size: 103 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Data Structures in Golang Fundamental Principles in Computer Science
In this repository, I'm going to implement text book principles we learned at university, for Data Structure. It was
mostly done in Java, and C#. However, I will demonstrate the implementation in Golang. There may be some data structure
that I might have not included here. I will do my best to research and create a proper jargon for Data Structures in Golang.
This could take time and more patience.
* [Queue](https://github.com/syniol/golang-data-structures/tree/main/queue)
* [Stack](https://github.com/syniol/golang-data-structures/tree/main/stack)
* [Array & Slice](https://github.com/syniol/golang-data-structures/blob/main/example_array_slice_test.go)
* [Map](https://github.com/syniol/golang-data-structures/blob/main/example_map_test.go)
## Queue
* FIFO (first-in-first-out)
* Elements added at the back of queue
## Stack
* LIFO (last-in-first-out)
* Elements added at the top of the queue
## Graphs
tbc
## Map
* Unordered
* Pointer by default
## Array & Slice
* Ordered
* Dynamic size
* Slice's element is a pointer to an Array
## Array
* Ordered
* Static size
* Arrays are values by default (meaning passing a copy of variable in a function)
#### Links
* [Microsoft .NET API Queue](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.queue-1)
* [Microsoft .NET API Stack](https://learn.microsoft.com/en-us/dotnet/api/system.collections.stack)
* [Google Golang Specification Map types](https://go.dev/ref/spec#Map_types)
* [Google Go maps in Action](https://go.dev/blog/maps)
* [Google Golang Specification Array types](https://go.dev/ref/spec#Array_types)
* [Google Golang Specification Slice types](https://go.dev/ref/spec#Slice_types)
##### Credits
Author: [Hadi Tajallaei](mailto:hadi@syniol.com)
Copyright © 2024, Syniol Limited. All rights reserved.