皮皮学,免费搜题
登录
搜题
【简答题】
Project 1: Performance Measurement Given a list of ordered N integers, numbered from 0 to N–1, checking to see that N is not in this list provides a worst case for many search algorithms. Consider two algorithms: one is called “ sequential search ” which scans through the list from left to right; and the other is “ binary search ” which is given on our PPT. Your tasks are: (1) Implement an iterative version and a recursive version of sequential search; (2) Implement an iterative version of binary search; (3) Analyze the worst case complexities of the above two versions of sequential search and that of binary search; (4) Measure and compare the worst case performances of the above three functions for N= 100,500,1000,2000,4000,6000,8000,10000. To measure the performance of a function, we may use C’s standard library time.h as the following: Note: If a function runs so quickly that it takes less than a tick to finish, we may repeat the function calls for K times to obtain a total run time(“ Total Time ”), and then divide the total time by K to obtain a more accurate duration(“ Duration ”) for a single fun of the function. The repetition factor must by large enough so that the number of elapsed ticks is at least 10 if we want an accuracy of at least 10%. The test results must be listed in the following table: The performances of the three functions must be plotted in the same N-running time coordinate system for illustration. project_1_班级_学号_姓名.doc
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【简答题】在实际使用中,为防止从动轴的速度波动幅度过大,单万向联轴器中两轴的夹角α一般不能超过 。
【单选题】调质热处理一般安排在( ▲ )进行。
A.
粗加工前
B.
粗加工后,半精加工前
C.
半精加工后,精加工前
D.
精加工后,光整加工前
【单选题】在实际使用中,为防止从动轴的速度波动幅度过大,单万向联轴器中两轴的夹角α一般不能超过( )
A.
20 °
B.
30 °
C.
45 °
D.
60 °
【简答题】同学们,这次课是一次系统复习课。主要内容是关于社会心理学研究方法的。 请认真复习以后,想象一下,如果自己去一个陌生的国家旅游?自己应该做好哪些功课?字数不少于500字。请拍照展示作业。
【单选题】下列关于"Word表格单元格"的叙述,正确的是()
A.
单元格的对边必定等长
B.
上下相邻单元格的宽度必定相等
C.
左右相邻单元格的高度必定相等
D.
表格中的某一条线被擦除后,单元格必将出现合并现象
【判断题】旅游心理学研究的主要对象是旅游从业人员之间相互作用中产生的心理活动变化。
A.
正确
B.
错误
【单选题】调质热处理一般安排在( )。
A.
毛坯制造之后
B.
粗加工之后
C.
半精加工之后
D.
精加工之后
【判断题】旅游心理学的主要研究对象和内容是旅游者心理和旅游从业人员心理。
A.
正确
B.
错误
【单选题】指示类通知是(  )布置任务和下达指示性措施所使用的通知。
A.
平级机关之间
B.
下级机关向上级机关
C.
上级机关向下级机关
D.
不相隶属机关之间
【单选题】调质热处理一般安排在 ( ▲ ) 进行
A.
粗加工前
B.
半精加工前
C.
精加工前
D.
光整加工前
相关题目: