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

全部博文(29)

文章存档

2015年(18)

2014年(11)

我的朋友

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

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

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

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

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

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

原文:http://www.cnblogs.com/steven_oyj/archive/2010/05/22/1741370.html一、基本概念   在计算机科学中,分治法是一种很重要的算法。字面上的解释是“分而治之”,就是把一个复杂的问题分成两个或更多的相同或相似的子问题,再把子问题分成更小的子问题……直到最后子问题可以简单的直接求解,原问题.........【阅读全文】

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

发布时间:2015-01-17 22:50:26

题目:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.最直观的解法,找出该字符串所有子字符串,依次判断该子字符串是否为回文字符串,之后再找出最长的子回文.........【阅读全文】

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

发布时间:2015-01-17 11:38:15

题目:You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)Output: 7 -> 0 -> 8解法:.........【阅读全文】

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

登录 注册