试题与答案

在11个元素的有序表A[1..11]中进行折半查找,查找元素A[8]时,被比较

题型:单项选择题

题目:

在11个元素的有序表A[1..11]中进行折半查找[*],查找元素A[8]时,被比较的元素的下标依次是

A.5,7,9,8
B.5,9,7,8

C.6,9,7,8
D.6,9,10,8

答案:

参考答案:C

解析:[要点解析] 在11个元素的有序表A[1..11]中进行折半查找

时,对应的判定树如图5-8所示,节点中的数字为数组元素的下标。


由图5-8可知,查找元素A[8]时,依次和元素A[6]、A[9]、A[7]和A[8]进行了比较。

试题推荐
题型:多项选择题 案例分析题

一般资料:求助者,廖某,女性,26岁,某外企翻译。案例介绍:求助者一年以前结婚,住在北京,开始的时候只有夫妻二人,两个人觉得很幸福。半年前廖女士的弟弟也来北京打工,并和廖女士一家住在一起。姐弟俩自小关系就很好,廖女士也很疼爱自己的弟弟。因为弟弟的到来,给夫妻二人的生活添加了不少麻烦,丈夫为此颇有微词。为照顾丈夫的情绪,求助者在中间做了不少工作。但是弟弟觉得姐姐不如以前对自己好,觉得姐姐变了。一边是自己的丈夫,一边是自己疼爱的弟弟,这让求助者左右为难,为此求助者很苦恼。最近经常为了一点小事就大发脾气,经常觉得自己没有能力,就这么个小问题自己都解决不了,让丈夫和弟弟都不开心。不知如何面对未来的婚姻,为此前来进行心理咨询。以下是求助者和心理咨询师的一段对话:求助者:这是我第一次来做心理咨询,不知道做心理咨询的都是什么样的人?您看我的问题可以做心理咨询吗?心理咨询师:做心理咨询的人各种各样,没有固定症状。求助者:您可以使用什么方法帮助我解决问题呢?心理咨询师:打算使用求助者中心疗法,我先介绍一下该疗法,这个方法以完美主义为哲学基础,原理、技术、过程等……求助者:您确定该疗法可以解决我的问题吗?心理咨询师:我相信您一定能解决自身的心理问题,因为我所信奉的求助者中心疗法对人性的基本看法就是……

求助者中心疗法的主要技术包括()。

A.设身处地的理解

B.坦诚地交流

C.表达无条件积极关注

D.积极引导

查看答案
题型:阅读理解

Say sorry to your wife---it may help her live longer, according to scientists.

“Sorry” may be the hardest word, but scientists say it could be one of the healthiest. Researchers have discovered that women who receive an apology for hurtful behavior suffer less stress and possible damage to their heart than those who don’t.

It is said that the heartbeat of a wronged woman returns to normal 20 percent quicker after a well-timed “sorry” than without it. But for men, their heartbeat takes longer to recover, according to the research.

The research was undertaken by American scientists using 29 men and 59  women whose diastolic blood pressure was measured throughout an experiment. Diastolic blood pressure

is a measure of pressure in the blood vessels( 血管 ) between heartbeats---if it is continuously high it can increase the chances of heart attacks.

The men and women were asked to undertake a difficult mathematical task. They were told they had five minutes to complete it but were disturbed after a minute and told rudely to carry out the task more quickly. They were disturbed twice more before five minutes had passed and told to speed up. Finally they were told, “ You’re obviously not good enough.” Two minutes later researchers said sorry to half of the men and women.

The researchers found that, on average, the women’s diastolic blood pressure dropped back to normal 20 percent---quicker if they received an apology from the researchers, while the men’s took 20 percent longer to return to normal. One of the researchers said, “Results indicates that the effects of apology and forgiveness on women are greater.”

小题1:The term “sorry” is considered as one of the healthiest words because it _________.

A.is the most powerful

B.can cure heart disease

C.helps people forget hurtful behavior

D.can reduce pressure and damage to the heart小题2:We can know from Paragraph 3 _________.

A.women’s hearts beat faster than men’s

B.women are quicker at making apologies

C.men can forgive others’mistakes more easily than women

D.men stay angry for a longer time than women after receiving an apology小题3:Which of the following is the RIGHT time order for events in the study?

a. Half of them received apologies.

b. They were disturbed a minute later.

c. They were told that they weren’t good enough.

d. They were asked to finish a math task in five minutes.

e. They were disturbed two more times during the study.

A.d-b-c-e-a

B.d-c-b-a-e

C.d-b-e-c-a

D.d-c-b-e-a小题4:The research confirmed (证实) that _________.

A.men are unwilling to apologize to others for their mistakes

B.men’s chances of getting heart attacks are higher than women’s

C.women can benefit more from receiving apologies than men

D.people can also get healthy benefits from giving apologies

查看答案
微信公众账号搜索答案