Giter Club home page Giter Club logo

algs-4-golang's Introduction

Algs-4-Golang

Algs-4-Golang is Golang port of the Java code in textbook Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.

It uses go module feature, make sure golang version >= 1.13.

Package Structure

Algs-4-Golang has clear structure.

  • abstract: API(interface) for abstract data structure.
  • impl: Implementation(source code & test cases) of abstract data structure.
  • utils: Useful tools to support test and debug.

Walk through impl, implemented algorithms organized in 6 sub-files corresponding to 6 chapters in Algs4 textbook.

  • impl/fundamentals
  • impl/sorting
  • impl/searching
  • impl/graphs
  • impl/strings
  • impl/context

Test Cases

Test cases in a examples file. Here is a simple usage to test interface Stack stated in abstract/stack.go

go run impl/fundamentals/examples/stack.go LinkedStack < data/tobe.txt

Algorithms Index

1. Fundamentals

Abstract Data Structure Implementation
Bag LinkedBag
ResizingArrayBag
Stack LinkedStack
ResizeArrayStack
Queue LinkedQueue
ResizingArrayQueue
Union-find QuickFindUF
QuickUnionUF
QuickUnionSizeUF
QuickUnionRankUF
QuickUnionCompressedUF
QuickUnionCompressedUF2

2. Sorting

Abstract Data Structure Implementation
Sorter(basic) Selection
Insertion
Advanced Insertion
Shell
Sorter(advanced) Merge
MergeBU
Advanced Merge
Quick
ThreeWayQuick
AdvancedQuick
Heap

3. Searching

Abstract Data Structure Implementation
SortedSymbolTable BinarySearchST
bstST
bstST_NotRecursive
SymbolTable SequentialSearchST
HashTableST
Traverse PreOrder
InOrder
PostOrder

algs-4-golang's People

Contributors

backblack avatar yinyajun avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.