发信人: hithunter (东坡肉), 信区: CRC
标  题: 往年inter的试题,我觉得挺难,不知大家怎么看(转载)
发信站: 哈工大紫丁香 (2002年11月05日13:52:14 星期二), 站内信件

【 以下文字转载自 Work 讨论区 】
【 原文由 yikoulian 所发表 】

发信站: BBS 水木清华站 (Sun Nov  3 18:21:52 2002)                         
                                            
: 1. 三个float:a,b,c                                                        
                                            
: 问值                                                                      
                                            
: (a+b)+c==(b+a)+c                                                          
                                            
: (a+b)+c==(a+c)+b                                                          
                                            
这个问题主要是考虑浮点运算的精度问题,在指令级的运算中,a+b和b+a
的精度是等效的,而(a+b)作为一个整体,相对于a和b会丢失精度。
从而,(a+b)+c==(b+a)+c的值是1,而第二问的值极大的概率是0
另外,需要提醒的是,浮点数在程序设计中一般不应该用来做==的比较。
: 2. 把一个链表反向填空                                                     
                                            
简单的做法是把每个节点的Next指针指向改为指向Forward
: 3. 设计一个重采样系统,说明如何anti-alias                                 
                                            
这个东西俺不明白,但是直觉应该是用sinc函数作为中间的桥梁
: 4. y1(n)=x(2n), y2(n)=x(n/2),问:                                         
                                            
: 如果y1为周期函数,那么x是否为周期函数                                     
                                            
: 如果x为周期函数,那么y1是否为周期函数                                     
                                            
: 如果y2为周期函数,那么x是否为周期函数                                     
                                            
: 如果x为周期函数,那么y2是否为周期函数                                     
                                            
这个就不做了,信号与系统的基本概念
: 5. 如果模拟信号的带宽为5KHZ,要用8K的采样率,怎么办。                     
                                            
用双通道就可以了,两个通道的夹角不超过2*arccos(5/8)
: 4. 某个程序在一个嵌入式系统(200M的CPU,50M的SDRAM)中已经最化了,换到另一   
                                            
: 个系统                                                                    
                                            
: (300M的CPU,50M的SDRAM)中运行,还需要优化吗?                              
                                            
需要重新优化,因为最优的程序通常考虑了CPU的运算能力和
存储介质传输速度之间的匹配。当CPU频率提高,传输速度不
变时,可是适当增加流水线负荷来提高CPU利用率。
: 5. x^4+a*x^3+x^2+c*x+d最少需要作几次乘法                                  
                                            
3次。
第一次:y=x*x, 第二次:z=y*x,第三次:t=y*y
: 7. 下面哪种排序法对12354最快                                              
                                            
: a quick sort                                                              
                                            
: b.buble sort                                                              
                                            
: c.merge sort                                                              
                                            
选b
: 8. 哪种结构,平均来讲,获取一个值最快                                     
                                            
: a. binary tree                                                            
                                            
: b. hash table                                                             
                                            
: 如果y2为周期函数,那么x是否为周期函数                                     
                                            
: 如果x为周期函数,那么y2是否为周期函数                                     
                                            
这个就不做了,信号与系统的基本概念
: 5. 如果模拟信号的带宽为5KHZ,要用8K的采样率,怎么办。                     
                                            
用双通道就可以了,两个通道的夹角不超过2*arccos(5/8)
: 4. 某个程序在一个嵌入式系统(200M的CPU,50M的SDRAM)中已经最化了,换到另一   
                                            
: 个系统                                                                    
                                            
: (300M的CPU,50M的SDRAM)中运行,还需要优化吗?                              
                                            
需要重新优化,因为最优的程序通常考虑了CPU的运算能力和
存储介质传输速度之间的匹配。当CPU频率提高,传输速度不
变时,可是适当增加流水线负荷来提高CPU利用率。
: 5. x^4+a*x^3+x^2+c*x+d最少需要作几次乘法                                  
                                            
3次。
第一次:y=x*x, 第二次:z=y*x,第三次:t=y*y
: 7. 下面哪种排序法对12354最快                                              
                                            
: a quick sort                                                              
                                            
: b.buble sort                                                              
                                            
: c.merge sort                                                              
                                            
选b
: 8. 哪种结构,平均来讲,获取一个值最快                                     
                                            
: a. binary tree                                                            
                                            
: b. hash table                                                             
                                            
: c. stack                                                                  
                                            
选b
: 大家讨论一下答案吧                                                        

--
※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: 202.118.181.77]
--
※ 转载:.哈工大紫丁香 bbs.hit.edu.cn.[FROM: 202.118.228.212]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:204.882毫秒