ClassicComputerScienceProblemsInPython icon indicating copy to clipboard operation
ClassicComputerScienceProblemsInPython copied to clipboard

Source Code for the Book Classic Computer Science Problems in Python

Results 6 ClassicComputerScienceProblemsInPython issues
Sort by recently updated
recently updated
newest added

Hello there, I think, you should modify the type hints, since the `xdist` and `ydist` are both integer, so sum of them is going to be integer too, right? https://github.com/davecom/ClassicComputerScienceProblemsInPython/blob/57d5f945e20eab0b88bea202d5a01e7318a5a613/Chapter2/maze.py#L100-L105

I get the error `Incompatible return value type (got "Tuple[C, ...]", expected "Tuple[C, C]")` from mypy in genetic_algorithm.py. These changes eliminated the error but I'm still new to type hints...

This patch resolves the concern raised in issue #23.

The constructor of the `Graph` class has `[]` as the default value for the `vertices` parameter. However, this implementation would fail the following test code. ```python class TestGraph(unittest.TestCase): def setUp(self):...

While debugging `missionaries.py`, I discovered that the `explored` set accumulates duplicate `MCState`s. To solve this problem, I've overridden the `__eq__` and `__hash__` of the `MCState`. This patch resolves the issue...

While solving the problem in `missionaries.py` using `generic_search.py` from Chapter 2, I found out that there are duplicate instances of `MCState` in `Node::explored`. ![스크린샷 2023-10-31 오후 2 08 29](https://github.com/davecom/ClassicComputerScienceProblemsInPython/assets/3656574/4867fc8e-26d1-49cb-b916-021c8cb0d3c4) This...