• + 3 comments

    Will this solution work for the below input?

                            3
                           / \
                          5   2
                         / \ / \
                        1   46  7
                         \
                          9
                         /
                        10
                       /
                     11
    

    I guess "11" will not be printed in spite of it being visible, as the branch containing 9 will not be traversed?