2017-11-25 40 views

回答

-1

It is a hard question for the beginners 但你可以通过使用一点浓度来解决它。 这是简单...

  1. 阅读从第一个字母,并丢弃它,如果堆叠中只有一个字母,然后检查它必须是a其他前进。
  2. 读取所有字符串并将其放入1堆栈中。
  3. 从1堆栈中弹出信件并丢弃它。
  4. 弹出所有的字母,并推送它在2堆栈中的所有字母。
  5. 重复第2步与2堆栈。

If you pop a letter from a stack and it is一个and both stacks are empty then the string is accepted.

It is a solution of the above question, Sorry for writing.

编码愉快。