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

2016年11月1日

leetcode 115 Distinct Subsequences ----- java
摘要: Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequence of a string is a new string which is formed from t 阅读全文
posted @ 2016-11-01 23:58 xiaoba1203 阅读(231) 评论(0) 推荐(0)
 
leetcode 119 Pascal's Triangle II ----- java
摘要: Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Return [1,3,3,1]. Note:Could you optimize your algorithm to us 阅读全文
posted @ 2016-11-01 22:15 xiaoba1203 阅读(189) 评论(0) 推荐(0)
 
leetcode 118 Pascal's Triangle ----- java
摘要: Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Return 用的比价暴力的方法, 也是最快的。 阅读全文
posted @ 2016-11-01 21:52 xiaoba1203 阅读(164) 评论(0) 推荐(0)
 
leetcode 117 Populating Next Right Pointers in Each Node II ----- java
摘要: Follow up for problem "Populating Next Right Pointers in Each Node". What if the given tree could be any binary tree? Would your previous solution sti 阅读全文
posted @ 2016-11-01 21:38 xiaoba1203 阅读(274) 评论(0) 推荐(0)
 
leetcode 116 Populating Next Right Pointers in Each Node ----- java
摘要: Given a binary tree Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to NULL 阅读全文
posted @ 2016-11-01 18:11 xiaoba1203 阅读(129) 评论(0) 推荐(0)
 
leetcode 114 Flatten Binary Tree to Linked List ----- java
摘要: Given a binary tree, flatten it to a linked list in-place. For example,Given The flattened tree should look like: 这道题就是将数变为只有右节点的树。 递归,不是很难。 递归的时候求出左节 阅读全文
posted @ 2016-11-01 15:16 xiaoba1203 阅读(220) 评论(0) 推荐(0)
 
 

公告


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