結果 : write algorithm for performing push and pop operations on stack