Skip to content

Bug in parseTree- > binary tree construction fails in ( ( 10 - 2 ) + 3 )  #2

Open
@SVDileepKumar

Description

@SVDileepKumar
        `if not currentTree.getLeftChild():
            currentTree.insertLeft(x)
        else:
            currentTree.insertRight(x)
        parent = stack.pop()
        currentTree = parent`

Above code should be present instead of
currentTree.setRootVal(int(i)) parent = pStack.pop() currentTree = parent

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions