go-algorithm

module
v0.0.0-...-2922d23 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: CC0-1.0

README

go-algorithm

Algorithms and Data Structures in Golang. These libraries are assumed to be used in competitive programming, so errors are not handled strictly.

Categories Examples
Standard Library Max/Min, Binary Search, Next Permutation, Standard Data Structure Examples
Data Structure Set, Queue, Stack, UnionFind, Segment Tree, Binary Indexed Tree
Dynamic Programming Knapsack, Bit, Digit
Graph Dijkstra, Floyd Warshall, Minimum Spanning Tree
Mathematics Binomial Coefficient, Prime Numbers, Eratosthenes
Sorting Insertion, Merge, Heap, Quick, Base

Standard Library

Standard Libraries in C++.

STL Function
  • Abs
  • GCD
  • LCM
  • Max
  • Min
  • Binary Search
  • Next Permutation
  • Pop Count (Only Example)
  • Reverse (Only Example)
  • Sort (Only Example)
STL Data Structure

We can simply create the following data structures by built-in structs such as map and slice.

If you want to implement set, queue and stack yourself, please refer to Data Structure directory.

  • Set (Only Example)
  • Queue (Only Example)
  • Stack (Only Example)
  • Priority Queue (Int Heap)

Dynamic Programming

  • Knapsack
  • Bit
  • Digit

Data Structure

  • Set
  • Queue
  • Stack
  • Priority Queue
  • UnionFind
  • Segment Tree
  • Binary Indexed Tree

Graph

  • Dijkstra
  • Floyd Warshall
  • Minimum Spanning Tree - Prim
  • Minimum Spanning Tree - Kruskal

Mathematics

Combinatorics
  • Binomial Coefficient
Number Theory
  • Modulo Power
  • Divisor
  • Primality Test
  • Integer Factorization
  • Sieve of Eratosthenes

Sorting

  • Insertion
  • Merge
  • Heap
  • Quick
  • Base
  • Bucket

Additional Information

Jump to

Keyboard shortcuts

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