結果 : use of stack and queue