首页 > 试题广场 >

证明:假设在过程HIRE-ASSISTANT的第4行中,我们

[问答题]
证明:假设在过程HIRE-ASSISTANT的第4行中,我们总能决定哪一个应聘者最佳,则意味着我们知道应聘者排名的全部次序。
HIRE-ASSISTANT(n)
1  best=0
2  for i=1 to n
3        interview candidate i
4       if candidate i is better than candidate best
5            best=i
6            hire candidate i

这道题你会答吗?花几分钟告诉大家答案吧!