• 博客园logo
  • 会员
  • 周边
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
LC凑热闹
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

04 2015 档案

 
回文字符序列
摘要:转载http://blog.csdn.net/u014800748/article/details/451484411、问题描述描述给定字符串,求它的回文子序列个数。回文子序列反转字符顺序后仍然与原序列相同。例如字符串aba中,回文子序列为"a", "a", "aa", "b", "aba",共5个... 阅读全文
posted @ 2015-04-22 21:55 LC凑热闹 阅读(267) 评论(0) 推荐(0)
动态规划求一个序列的最长回文子序列(Longest Palindromic Substring )
摘要:1、问题描述给定一个字符串(序列),求该序列的最长的回文子序列。2、分析需要理解的几个概念:---回文---子序列---子串http://www.cnblogs.com/LCCRNblog/p/4321398.html这一篇文章描述了利用动态规划求解两个序列的最长公共子序列(Longest Comm... 阅读全文
posted @ 2015-04-21 12:45 LC凑热闹 阅读(864) 评论(0) 推荐(0)
统计闰年2月29日天数
摘要:1.问题描述描述给定两个日期,计算这两个日期之间有多少个2月29日(包括起始日期)。只有闰年有2月29日,满足以下一个条件的年份为闰年:1. 年份能被4整除但不能被100整除2. 年份能被400整除输入第一行为一个整数T,表示数据组数。之后每组数据包含两行。每一行格式为"month day, yea... 阅读全文
posted @ 2015-04-19 16:15 LC凑热闹 阅读(650) 评论(0) 推荐(0)
Leetcode 172 Factorial Trailing Zeroes
摘要:1、题目要求Given an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.题目意思是求n的阶乘后面末尾0的个数,并且时间... 阅读全文
posted @ 2015-04-04 16:44 LC凑热闹 阅读(206) 评论(0) 推荐(0)
Leetcode 199 Binary Tree Right Side View
摘要:1.题目要求Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.For ... 阅读全文
posted @ 2015-04-04 15:15 LC凑热闹 阅读(536) 评论(0) 推荐(0)
Leetcode 198 House Robber
摘要:1.题目要求You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopp... 阅读全文
posted @ 2015-04-04 13:59 LC凑热闹 阅读(312) 评论(0) 推荐(0)
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3