Skip to content

MutableBkTree iterative equals, hashCode, and toString #2

@kelseyfrancis

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.

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