• + 3 comments

    simple approach::

    1) calculate all the sum of each stacks
    2) pop out a item on the surface from the current maximum height stack.
    3) check all the stacks have the same height
    

    looping 2) and 3) nothing left to pop out