2014年05月15日
来源:互联网 发布:呱呱社区软件 编辑:程序博客网 时间:2024/04/19 19:22
practice 3-1:Our binary search makes two tests insidethe loop,when one would suffice (at the price of more testsoutside).Write a version with only one test inside the loop andmeasure the difference in run-time.
#include
#include
#define MAX_ELEMENT 20000
int binsearch1(int x,int v[],int n)
{
}
int binsearch2(int x,int v[],int n)
{
}
main()
{
}
conclusion: I have to admit how difficult to understandthese code, especially the part of time calculate .However,we needbelieve in that,more attempts, more progress.So just try it and take sometime to assimilate it.
- 2014年05月15日
- 2014年05月15日
- 2014年05月15日
- 2014年05月10日
- 2014年05月11日
- 2014年05月13日
- 2014年05月13日
- 2014年05月13日
- 2014年05月14日
- 2014年05月14日
- 2014年05月16日
- 2014年05月19日
- 2014年05月19日
- 2014年05月19日
- 2014年05月20日
- 2014年05月21日
- 2014年05月21日
- 2014年05月21日
- 2014年05月14日
- 2014年05月14日
- 2014年05月15日
- sdk manager 遇到 fetch fail的解决办法
- poj 1166 拨钟问题 参考USACO 方法
- 2014年05月15日
- 2014年05月15日
- 每日一dp(3)——POJ 1141 Brackets Sequence
- 2014年05月16日
- 2014年05月19日
- Centos 7 修改SSH端口号
- hdu 4730 We Love MOE Girls
- 2014年05月19日
- 2014年05月19日