Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error running data_structures/binary_tree.py by hand #2

Closed
a1eaiactaest opened this issue Oct 24, 2022 · 1 comment
Closed

error running data_structures/binary_tree.py by hand #2

a1eaiactaest opened this issue Oct 24, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@a1eaiactaest
Copy link
Owner

prybiec :: ~/fun/ADS/ads/data_structures 1 » python3 binary_tree.py
Traceback (most recent call last):
  File "/Users/prybiec/fun/ADS/ads/data_structures/binary_tree.py", line 388, in <module>
    x = build_binary_tree([50,None,54,98,6,None,None,None,34])
  File "/Users/prybiec/fun/ADS/ads/data_structures/binary_tree.py", line 366, in build_binary_tree
    root.insert(arr[i])
  File "/Users/prybiec/fun/ADS/ads/data_structures/binary_tree.py", line 105, in insert
    if data < self.data and self.left is not None:
TypeError: '<' not supported between instances of 'NoneType' and 'int'
@a1eaiactaest a1eaiactaest self-assigned this Oct 24, 2022
@a1eaiactaest a1eaiactaest added the bug Something isn't working label Oct 24, 2022
@a1eaiactaest a1eaiactaest pinned this issue Oct 24, 2022
@a1eaiactaest
Copy link
Owner Author

Also write tests for this, if this isn't working and tests are passing something is wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant