結果 : algorithm for stack operations using array