Skip to content

Replace tests of binary tree with in-order and pre-order #294

Closed
@czgdp1807

Description

@czgdp1807

Description of the problem

As of now, the correctness of operations on a binary tree is determined by verifying the str(tree) with the expected string. This makes it quite difficult to check the tests. Instead of using, str(tree), in-order and pre-order should be checked since, using both these traversals a binary tree can be uniquely constructed.

Example of the problem

See the tests of RedBlackTree.

References/Other comments

[1] #293

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions