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

随笔分类 -  leetcode

上一页 1 2 3 4 5 6 7 8 9 下一页

leetcode 历程
 
leetcode 129. Sum Root to Leaf Numbers ----- java
摘要:Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 whic 阅读全文
posted @ 2016-11-06 20:11 xiaoba1203 阅读(111) 评论(0) 推荐(0)
leetcode 128. Longest Consecutive Sequence ----- java
摘要:Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example,Given [100, 4, 200, 1, 3, 2],The longes 阅读全文
posted @ 2016-11-06 19:58 xiaoba1203 阅读(232) 评论(0) 推荐(0)
leetcode 127. Word Ladder ----- java
摘要:Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, 阅读全文
posted @ 2016-11-06 18:35 xiaoba1203 阅读(261) 评论(0) 推荐(0)
leetcode 126. Word Ladder II ----- java
摘要:Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformation sequence(s) from beginWord to endWord, such th 阅读全文
posted @ 2016-11-06 17:53 xiaoba1203 阅读(350) 评论(0) 推荐(0)
leetcode 125. Valid Palindrome ----- java
摘要:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a canal: Pan 阅读全文
posted @ 2016-11-05 15:25 xiaoba1203 阅读(479) 评论(0) 推荐(0)
leetcode 124. Binary Tree Maximum Path Sum ----- java
摘要:Given a binary tree, find the maximum path sum. For this problem, a path is defined as any sequence of nodes from some starting node to any node in th 阅读全文
posted @ 2016-11-05 14:33 xiaoba1203 阅读(144) 评论(0) 推荐(0)
leetcode 123. Best Time to Buy and Sell Stock III ----- java
摘要:Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2016-11-05 12:29 xiaoba1203 阅读(157) 评论(0) 推荐(0)
leetcode 122. Best Time to Buy and Sell Stock II ----- java
摘要:Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2016-11-02 17:37 xiaoba1203 阅读(206) 评论(0) 推荐(0)
leetcode 121. Best Time to Buy and Sell Stock ----- java
摘要:Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction 阅读全文
posted @ 2016-11-02 17:11 xiaoba1203 阅读(141) 评论(0) 推荐(0)
leetcode 120 Triangle ----- java
摘要:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the fo 阅读全文
posted @ 2016-11-02 16:37 xiaoba1203 阅读(359) 评论(0) 推荐(0)
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 阅读(233) 评论(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 阅读(190) 评论(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 阅读(130) 评论(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)
leetcode 113 Path Sum II ----- java
摘要:Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example:Given the below binary tree and sum 阅读全文
posted @ 2016-10-29 17:54 xiaoba1203 阅读(262) 评论(0) 推荐(0)
leetcode 112 Path Sum ----- java
摘要:Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. F 阅读全文
posted @ 2016-10-29 17:31 xiaoba1203 阅读(150) 评论(0) 推荐(0)
leetcode 111 Minimum Depth of Binary Tree ----- java
摘要:Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest l 阅读全文
posted @ 2016-10-29 16:49 xiaoba1203 阅读(148) 评论(0) 推荐(0)
leetcode 110 Balanced Binary Tree ----- java
摘要:Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the dept 阅读全文
posted @ 2016-10-29 16:39 xiaoba1203 阅读(146) 评论(0) 推荐(0)
 

上一页 1 2 3 4 5 6 7 8 9 下一页

公告


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