Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

change non recurring DFS #52

Closed
wants to merge 3 commits into from
Closed

Conversation

kkngsm
Copy link
Contributor

@kkngsm kkngsm commented Aug 5, 2022

I changed the implementation to non-recurring DFS.
This will do the following well.

  1. This implementation does not use recursion, so it does not cause a stack overflow even if the number of nodes is large.
  2. Infinite loop countermeasure #21

inf

@kkngsm kkngsm mentioned this pull request Aug 5, 2022
@kkngsm
Copy link
Contributor Author

kkngsm commented Aug 7, 2022

One problem with this approach is that if more than one input receives a single output, it will be stored in a duplicate calculation order list.
I'm currently working on a solution to this problem, but have not been able to improve it.

@setzer22
Copy link
Owner

Hi! Many thanks for the PR :) Currently a bit busy but I'll have a look and get back to you soon 👍

@kkngsm
Copy link
Contributor Author

kkngsm commented Sep 17, 2022

Close because this PR has little merit and is getting old. 

@kkngsm kkngsm closed this Sep 17, 2022
@setzer22
Copy link
Owner

I'm sorry you feel that way! I already had a quick look at the changes and I like the overall direction, but to be honest I haven't yet had time to take a proper look at it due to several irl things that have got me quite busy for the past few months.

I've been merging other PRs since, but the scope of this is a bit larger so I wanted to take proper time to review it. My overall feeling was that this change is useful to other users and I was inclined to merge it 👍

@kkngsm kkngsm deleted the non-recurring-DFS branch September 18, 2022 09:04
@kkngsm
Copy link
Contributor Author

kkngsm commented Sep 18, 2022

Sorry, I didn't word it right.
I realized that the infinite loop countermeasure can be done by just adding a little bit of writing to the current state using a recursive function. On top of that, I have decided to build another minimal PR because there is little advantage to a NON RECURRING DFS.
I thank @setzer22 for building a great library and of course you can prioritize your day job😊👍.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants