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






发布时间: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.........【阅读全文】

阅读(936) | 评论(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.........【阅读全文】

阅读(789) | 评论(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 .........【阅读全文】

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

发布时间:2015-01-19 11:26:49

题目:The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S I I GY I RAnd then read line by line: "PAHNAPLSIIGYIR"Write the co.........【阅读全文】

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

发布时间:2015-01-18 14:33:28

原文:一、基本概念    动态规划过程是:每次决策依赖于当前状态,又随即引起状态的转移。一个决策序列就是在变化的状态中产生出来的,所以,这种多阶段最优化决策解决问题的过程就称为动态规划。二、基本思想与策略&nbs.........【阅读全文】

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

登录 注册