问题 单项选择题

对下列二叉树

进行前序遍历的结果为

A.DYBEAFCZX

B.YDEBFZXCA

C.ABDYECFXZ

D.ABCDEFXYZ

答案

参考答案:C

解析: 本题考查数据结构中二叉树的遍历。根据对二叉树根的访问先后顺序不同,分别称为前序遍历、中序遍历和后序遍历。这三种遍历都是递归定义的,即在其子树中也按照同样的规律进行遍历。下面就是前序遍历方法的递归定义。当二叉树的根不为空时,依次执行如下3个操作:(1)访问根结点(2)按先序遍历左子树(3)按先序遍历右子树根据如上前序遍历规则,来遍历本题中的二叉树。首先访问根结点,即A,然后遍历A的左子树。遍历左子树同样按照相同的规则首先访问根结点B,然后遍历B的左子树。遍历B的左子树,首先访问D,然后访问D的左子树,D的左子树为空,接下来访问D的右子树,即Y。遍历完B的左子树后,再遍历B的右子树,即E。到此遍历完A的左子树,接下来遍历A的右子树。按照同样的规则,首先访问C,然后遍历C的左子树,即F。C的左子树遍历完,接着遍历C的右子树。首先访问右子树的根结点X,然后访问X的左子树,X的左子树,即Z,接下来访问X的右子树,右子树为空。到此,把题目的二叉树进行了一次前序遍历。遍历的结果为 ABDYECFXZ,故本题的正确答案为选项C。

填空题
单项选择题

Western juries have traditionally found eyewitness testimony to be the most convincing evidence in criminal trials. Seeing is believing, as the saying goes. In numerous cases, when witnesses pointed to the defendant, his or her fate was sealed. But how reliable is eyewitness testimony Recent cases have suggested that despite our best intentions, we may unwittingly distort what we perceive.
Artists and psychologists have long known that "seeing" is not a simple matter of recording visual input. People perceive the exterior world through a complex matrix of cultural expectations, personality traits, moods and life experiences. For example, researchers tested the cultural influence on perception by showing a set of optical illusions to various groups, and found that different groups responded in divergent ways. Accustomed to and inundated by perpendicular structures, Western Europeans succumbed easily to illusions based on rectangular lines. On the other hand, the Zulu people of South Africa, whose environment had been comprised almost entirely of circular forms (round houses, doors, etc.) did not fall prey to those linear illusions.
Cultural expectations also influence the selectivity of our seeing. The amount of visual information that exists far exceeds our ability to process it, so we must filter that sensory input into recognizable images. In looking at a face, we do not see elongated ovals set in complex shadows and shading, we see eyes. And that filtering process is informed by what we perceive to be significant, which is influenced by cultural norms. Some cultures may emphasize differences in hair color or texture, others the shape of a nose or mouth, others the set of the eyes.
But it is not only group expectations that color what we see, personality and mood fluctuation can also alter our perceptions. Orderly minds who shun ambiguity will see an off- center image as firmly fixed in the center. The same photograph of four young men allows for shifting interpretations based on our current feeling: a mood of happiness reveals boys enjoying a relaxing day, while anxiety changes the picture to students worrying about exams.
In addition, numerous more prosaic factors affect our ability to record an image accurately. Duration of the encounter, proximity to the subject, lighting, and angle all affect our ability to see, and even stress may further undermine the accuracy of our perceptions.
What will this mean for criminal trials Juries have often been reluctant to convict without eyewitness identification. Blood samples, fingerprints, and the like do not resonate as deeply with juries as does direct testimony, and frequently require understanding of complex scientific technicalities. But as confidence in eyewitness testimony wanes, such circumstantial evidence may someday replace visual identification as the lynchpin of criminal trials.

According to the author, eyewitness testimony is ______ .

A.always a reliable evidence

B.the most convincing evidence

C.sometimes a distortion of people’s perception

D.a simple recording of visual input