Chinaunix首页 | 论坛 | 博客
  • 博客访问: 77156
  • 博文数量: 29
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 225
  • 用 户 组: 普通用户
  • 注册时间: 2014-03-06 15:31
文章分类

全部博文(29)

文章存档

2015年(18)

2014年(11)

我的朋友

发布时间:2015-03-30 09:06:55

RT......【阅读全文】

阅读(821) | 评论(0) | 转发(0)

发布时间:2015-02-04 09:43:04

题目:Write a function to find the longest common prefix string amongst an array of strings.分析:典型题目。LCP问题,即找出字符串数组中最大公共前缀。思路为先找出前两个字符串的公共前缀,再找出该公共前缀与下一个字符串的公共前缀,以此类推,直到找出所有字符串的公共前缀。程序如下:点击(此处)折.........【阅读全文】

阅读(1001) | 评论(0) | 转发(0)

发布时间:2015-01-22 17:33:11

题目:Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis fo.........【阅读全文】

阅读(1115) | 评论(0) | 转发(0)

发布时间:2015-01-21 10:20:21

题目:Determine whether an integer is a palindrome. Do this without extra space.题目给出的hint:Could negative integers be palindromes? (ie, -1)If you are thinking of converting the integer to string, note the restriction of using extra space.You could also try reversing an integer. Howe.........【阅读全文】

阅读(932) | 评论(0) | 转发(0)

发布时间:2015-01-19 21:22:51

题目:Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases.Notes: It is intended for this problem to be specified vaguely .........【阅读全文】

阅读(1050) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册