examples/

directory
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2025 License: MIT

README

Data Structures Examples

This folder contains examples of using basic data structures.

Content

  1. **Stack

    • Array-based stack implementation
    • LinkedList based stack implementation
    • LIFO (Last In First Out) principle
  2. Queue (Queue)

    • Array-based queue implementation
    • LinkedList based queue implementation
    • FIFO (First In First Out) principle
  3. **LinkedList

    • Single linked list
    • Adding, deleting and searching elements
    • Add elements at the beginning and end of a list
  4. **Tree

    • Binary Search Tree implementation
    • Tree traversal methods (Inorder, Preorder, Postorder)
    • Adding, deleting and searching elements
  5. Heap

    • Min Heap implementation
    • Max Heap implementation
    • Priority queuing applications
  6. Hash Table

    • Hash function implementation
    • Conflict resolution strategies
    • Working with key-value pairs

Usage

Each data structure has its own folder with examples. To run the examples:

# Run example
go run examples/stack/stack_examples.go
go run examples/queue/queue_examples.go
go run examples/linkedlist/linkedlist_examples.go
go run examples/tree/binary_tree_examples.go
go run examples/heap/heap_examples.go
go run examples/hash/hash_examples.go

Notes

  • Each example file illustrates the basic operations of the corresponding data structure
  • Examples include practical uses of data structures
  • Each example includes explanatory comments

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL