惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
Cisco Talos Blog
Cisco Talos Blog
C
Check Point Blog
博客园_首页
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Martin Fowler
Martin Fowler
Recorded Future
Recorded Future
S
Security @ Cisco Blogs
L
LINUX DO - 最新话题
博客园 - 司徒正美
P
Privacy International News Feed
G
Google Developers Blog
I
Intezer
Hacker News - Newest:
Hacker News - Newest: "LLM"
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
C
Cybersecurity and Infrastructure Security Agency CISA
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
K
Kaspersky official blog
I
InfoQ
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
Webroot Blog
Webroot Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
大猫的无限游戏
大猫的无限游戏
D
Docker
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
Microsoft Azure Blog
Microsoft Azure Blog
Spread Privacy
Spread Privacy
量子位
H
Hacker News: Front Page
Simon Willison's Weblog
Simon Willison's Weblog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
SecWiki News
SecWiki News
S
Security Affairs
Latest news
Latest news
人人都是产品经理
人人都是产品经理
C
CERT Recently Published Vulnerability Notes
S
Security Archives - TechRepublic
V
Visual Studio Blog
T
Troy Hunt's Blog
S
Secure Thoughts
F
Fortinet All Blogs
V
V2EX
The Register - Security
The Register - Security
J
Java Code Geeks
MongoDB | Blog
MongoDB | Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

博客园 - Eugene Leung

The AndroidManifest.xml File Make Web Not War 不使网站成为战场 地理考考你 开始进入SilverLight 邓亚萍博士学位论文 英文题目 DartTrainer 免费下载 从MSN Messenger的Hand Writing开始 今天闲暇的时候画了两幅画 fyiReporting RDLC Report Custom Code - Eugene Leung 骑 自行车 从公司 到家 - Eugene Leung 猴面包树果 baobab tree - Eugene Leung 继承Form中的DevExpress控件不能打开编辑器Designer - Eugene Leung LJP Little John PalmOS 1.0 Release 最新版 (RC9后的正式版) - Eugene Leung 当你老了 --叶芝 - Eugene Leung 我的语文备忘 - Eugene Leung 新开始做wpf,随便写点经验 - Eugene Leung 初中英语课本里隐藏着的惊人秘密(转载) - Eugene Leung 如果不出意外,我每周都会去工大打球 - Eugene Leung 关于 韩国 申明 豆浆 和 端午 是其国家创造或历史的 看法 - Eugene Leung
这几个问题我来答
Eugene Leung · 2009-03-04 · via 博客园 - Eugene Leung

算法

  1. 怎样知道一个数字是不是2的乘方?怎样判断一个数是不是奇数?      a. 用该数x与x-1做&操作,结果为零则x为2的乘方,另外2的乘方的末尾规律为2、4、8、6。 b. 奇数比较好判断,只要最后一位是奇数那这个数就是奇数
  2. 怎样找出链表中间的元素?     用两根指针指向表头,当a到一步,b就动两步。
  3. 怎样改变10,000个静态HTML页面中所有电话号码的格式? 这个不大清楚,不过我认为正则表达式是一个不错的选择
  4. 举出一个你所用过的递归的例子。 生成多级菜单(递推) 兔子数列(递归)
  5. 在散列表和排序后的列表中找一个元素,哪个查找速度最快?  排序表用二分法查找耗时比较稳定 O(n2) ,散列表不稳定,但可能比排序表快。
  6. 不管是书、杂志还是网络,你从中所学到的最后一点算法知识是什么? “算法是解决问题的步骤,会因为实际问题的需要变化”
  7. 怎样把字符串反转?你能不用临时的字符串么?   用两个指针, a指向头,b指向尾,b递减直到a,依次输出b指针指向的值。
  8. 你愿意用什么类型的语言来编写复杂的算法? C系列语言
  9. 有一个数组,里面是从1到1,000,000的整数,其中有一个数字出现了两次,你怎么找出那个重复的数字? 排序,然后比对相临数字
  10. 你知道“旅行商问题(Traveling Salesman Problem)”么? 查Google

posted on 2009-03-04 12:45  Eugene Leung  阅读(306)  评论()    收藏  举报