An open API service indexing awesome lists of open source software.

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

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.