问题 单项选择题

一个栈的入栈序列是a,b,c,d,e,则栈不可能的输出序列是( )。

A.e d c b a

B. d e c b a

C.d c e a b

D.a b c d e

答案

参考答案:C

解析:栈是限制仅在表的一端进行插入和删除运算的线性表,通常称插入、删除的这一端为栈顶(Top),另一端称为栈底(Bottom)。当表中没有元素时称为空栈。根据上述定义,每次删除(退栈)的总是当前栈中“最新”的元素,即最后插入(进栈)的元素,而最先插入的是被放在栈的底部,要到最后才能删除。根据上述原理,C)dceab,既然先出栈的是d,说明a,b,c已经进栈,那么a不可能在b之前出栈。

阅读理解
阅读理解。
       One morning, Jim Reed checked his e-mail. He found a strange message on the e-mail. It was from a
woman in Pittsburgh, Pennsylvania. He had talked to her on e-mail many times in the last ten days. All the
other messages were fun and interesting to read, but this message was different.
       The message said, "Good-bye loved kowihn yu I amj leaving."
       Mr. Reed was frightened by the message. He tried to understand the words that were not spelled right.
He quickly wrote a message to his new friend. 
      "What do you mean by the message you just sent me?"
       He waited but did not get an answer. He wrote back, "Please talk to me."
       Finally, she wrote, "I am fallg asleep waht it say gildgye ti ny friends." Mr. Reed thought hard about
this message. "Is she going to kill herself?" he thought.
       "What is your phone number?" he typed. The woman sent a phone number. Mr. Reed called. At first the
phone was busy. Then it just rang and rang. He called directory assistance in Pittsburgh. They connected him
with the police. Reed told his story. Then he faxed them what his friend wrote.
        The police and paramedics quickly went to the woman's house. When she didn't answer the doorbell,
they broke in. They found her on the floor near the computer. She told them, "I took 60 pills." The paramedics
rushed her to the hospital.
        "Mr. Reed did a great job of saving this woman," the police captain said. "If he hadn't guessed at the
e-message, she would be dead now." The woman is fine now, and she thanks Mr. Reed for saving her life.
1. Mr Reed ___________.
[ ]
A. met his new friend by telephone
B. saw his new friend somewhere before
C. wrote e-mail to his new friend for ten days
D. talked with his new friend about strange things
2. The e-message he found was strange ___________.
[ ]
A. because the message was fun to read
B. because the message was interesting to read
C. because the words were not spelled correctly
D. because the message wasn't fun or interesting as usual
3. It was the woman's ___________ that saved her life.
[ ]
A. computer
B. friend
C. message
D. teleghone
4. We can infer(推断)that ___________.
[ ]
A. the woman will be Mr Reed's wife
B. the police will punish the woman for her foolishness
C. Mr Reed will be a policeman to save more people
D. the public will think highly of Mr Reed
单项选择题