Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdded Iterative Deepening Depth First Search #2637
Open
Conversation
added 3 commits
Oct 2, 2020
| def ids(graph, start, goal): | ||
| # dfs helper function to perform depth limited dfs | ||
| def dfs(graph, start, goal, depth, path): |
Comment on lines
+7
to
+9
dhruvmanila
Oct 3, 2020
Member
- Full function name instead of one letter name
- Type hints
- Doctest
- Full function name instead of one letter name
- Type hints
- Doctest
| """ | ||
| if any of the above dfs runs do not give path, | ||
| then it means node does not exist and return -1 | ||
| """ |
Comment on lines
+23
to
+26
dhruvmanila
Oct 3, 2020
Member
Don't mix docstring with comments.
Use """ ... """ for docstrings and # ... for comments
Don't mix docstring with comments.
Use """ ... """ for docstrings and # ... for comments
| """ | ||
| A sample map of Romania | ||
| (Taken from Chapter 3 of Russell & Norvig. Artificial Intelligence) | ||
| """ |
Comment on lines
+39
to
+42
dhruvmanila
Oct 3, 2020
Member
This will be a comment.
Please provide the link to the resource.
This will be a comment.
Please provide the link to the resource.
| path.append(start) | ||
| if start == goal: | ||
| return path | ||
| for i in graph[start]: |
dhruvmanila
Oct 3, 2020
Member
What is i in here?
Please use appropriate names for the variables as mentioned in CONTRIBUTING.md
What is i in here?
Please use appropriate names for the variables as mentioned in CONTRIBUTING.md
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.


Describe your change:
Checklist:
Fixes: #{$ISSUE_NO}.