Skip to content

MutableBkTree iterative equals, hashCode, and toString #2

Description

@kelseyfrancis

Whereas MutableBkTree's add methods are implemented iteratively to handle trees of any depth, the equals, hashCode, and toString methods are currently implemented using recursively, which means they might fail on very deep trees.

A recursive implementation is straightforward, as it relies on the equals method of the MutableNode.childrenByDistance Map. An iterative implementation would need to an iterative method to determine the equality of that Map.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions