Skip to content

petertseng-dp/adjacency-matrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adjacency Matrix Generator

Build Status

Notes

This was fine. I cut corners by not checking the entire edge for validity.

Unfortunately the backslashes look ugly. This could be avoided by putting the inputs into a non-Crystal file.

Don't forget to negate the forbidden direction when hitting a dummy node. Otherwise you could get into an infinite loop traveling between two of them.

The work to prevent tracing each path twice is a premature optimization, but it's interesting. Requires keeping track of which direction you just traveled from. Make sure to do this right with dummy nodes too.

Source

https://www.reddit.com/r/dailyprogrammer/comments/3h0uki/

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published