This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
So i have a school project where i am making a board. Board is a graph like stucture. I do not know what is the number of the nodes i want to get back or how many are they (number could range to 2-8) I only know how far are they from my current node.
I am fairly certain that it can be solved with a Breadth-first search although not sure how
This is my code, i do know that is not good (i think the main problem is that this counter solution doesn't mean it will go into the right "if" at the right time), have no idea why: https://pastebin.com/V5qZvSWu
This is the node class https://pastebin.com/83zf4dE9
Subreddit
Post Details
- Posted
- 2 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/CodingHelp/...