Skip to content

ewalk153/route-finder-zig

Repository files navigation

Route Finder in Zig

An offshoot of One day in Paris, this explores the code constructs of Zig by reimplementing Dijkstra's algorithm (well a variant of it) to learn about the following tasks:

  • Read and parse a structured text file (a tsv here)
  • String manipulation
  • Object initialization, and basic of memory management
  • Using advanced data structures like priority queue, and ArrayLists

Progress:

  • parse text structure from a file and read into data structures
  • implement basic Dijkstra route finding
  • split project into multiple files
  • add backtracking
  • given the problem domain is train routes, lay on train line switching costs
  • implement single source to all-destination Dijkstra
  • write results out as a csv file (could be a file or stdout)
  • demonstrate importing code from another repository (perhaps)
  • convert Dijkstra routines to process generic types

build_nodes.zig holds the main code for this project.

Resources for zig learning

About

Dijkstra's algorithm, in zig

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages