Boostable

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
  116 随笔 :: 0 文章 :: 28 评论 :: 92349 阅读

08 2014 档案

摘要:LeetCode: Decode WaysA message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given a... 阅读全文
posted @ 2014-08-31 22:37 Boostable 阅读(251) 评论(0) 推荐(0)

摘要:LeetCode: SubsetsGiven a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The soluti... 阅读全文
posted @ 2014-08-31 22:25 Boostable 阅读(292) 评论(0) 推荐(0)

摘要:LeetCode: Reverse Linked ListReverse a linked list from position m to n. Do it in-place and in one-pass. For example:Given 1->2->3->4->5->NULL, m = 2 ... 阅读全文
posted @ 2014-08-31 22:11 Boostable 阅读(314) 评论(0) 推荐(0)

摘要:LeetCode: Restore IP AddressesGiven a string containing only digits, restore it by returning all possible valid IP address combinations. For example:G... 阅读全文
posted @ 2014-08-31 22:00 Boostable 阅读(234) 评论(0) 推荐(0)

摘要:LeetCode: Binary Tree Inorder TraversalGiven a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}... 阅读全文
posted @ 2014-08-31 21:49 Boostable 阅读(300) 评论(0) 推荐(0)

摘要:LeetCode: Unique Binary Search TreesGiven n, how many structurally unique BST's (binary search trees) that store values 1...n? For example,Given n = 3... 阅读全文
posted @ 2014-08-31 21:43 Boostable 阅读(221) 评论(0) 推荐(0)

摘要:LeetCode: Interleaving StringGiven s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example,Given:s1 = "aabcc",s2 = "dbbca"... 阅读全文
posted @ 2014-08-28 22:42 Boostable 阅读(300) 评论(0) 推荐(0)

摘要:LeetCode: Validata Binary Search TreeGiven a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The l... 阅读全文
posted @ 2014-08-28 22:29 Boostable 阅读(144) 评论(0) 推荐(0)

摘要:LeetCode: Recover Binary Search TreeTwo elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.... 阅读全文
posted @ 2014-08-28 22:26 Boostable 阅读(183) 评论(0) 推荐(0)

摘要:LeetCode: Same TreeGiven two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are struct... 阅读全文
posted @ 2014-08-28 22:14 Boostable 阅读(232) 评论(0) 推荐(0)

摘要:LeetCode: Symmetric TreeGiven a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is... 阅读全文
posted @ 2014-08-28 22:12 Boostable 阅读(253) 评论(0) 推荐(0)

摘要:LeetCode: Binary Tree Zigzag Level Order TraversalGiven a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to... 阅读全文
posted @ 2014-08-27 21:42 Boostable 阅读(259) 评论(0) 推荐(0)

摘要:LeetCode: Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from... 阅读全文
posted @ 2014-08-27 21:37 Boostable 阅读(156) 评论(0) 推荐(0)

摘要:LeetCode: Construct Binary Tree from Preorder and Inorder TraversalGiven preorder and inorder traversal of a tree, construct the binary tree.Note:You ... 阅读全文
posted @ 2014-08-27 21:34 Boostable 阅读(132) 评论(0) 推荐(0)

摘要:LeetCode: Construct Binary Tree from Inorder and Postorder TraversalGiven inorder and postorder traversal of a tree, construct the binary tree.Note:Yo... 阅读全文
posted @ 2014-08-27 21:31 Boostable 阅读(166) 评论(0) 推荐(0)

摘要:LeetCode: Binary Tree Level Order TraversalGiven a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level ... 阅读全文
posted @ 2014-08-27 21:28 Boostable 阅读(381) 评论(0) 推荐(0)

摘要:LeetCode: Convert Sorted Array to Binary Search TreeGiven an array where elements are sorted in ascending order, convert it to a height balanced BST.地... 阅读全文
posted @ 2014-08-27 21:19 Boostable 阅读(150) 评论(0) 推荐(0)

摘要:LeetCode: Convert Sorted List to Binary Search TreeGiven a singly linked list where elements are sorted in ascending order, convert it to a height bal... 阅读全文
posted @ 2014-08-27 21:16 Boostable 阅读(109) 评论(0) 推荐(0)

摘要:LeetCode: Balanced Binary TreeGiven a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a ... 阅读全文
posted @ 2014-08-27 21:02 Boostable 阅读(274) 评论(0) 推荐(0)

摘要:LeetCode: Minimum Depth of Binary TreeGiven a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path fro... 阅读全文
posted @ 2014-08-26 22:40 Boostable 阅读(149) 评论(0) 推荐(0)

摘要:LeetCode: Path SumGiven 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 equal... 阅读全文
posted @ 2014-08-26 22:37 Boostable 阅读(232) 评论(0) 推荐(0)

摘要:LeetCode: Flatten Binary Tree to Linked ListGiven a binary tree, flatten it to a linked list in-place. For example,Given 1 / \ 2 ... 阅读全文
posted @ 2014-08-26 22:32 Boostable 阅读(161) 评论(0) 推荐(0)

摘要:LeetCode: Distinct SubsequencesGiven 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... 阅读全文
posted @ 2014-08-26 22:24 Boostable 阅读(246) 评论(0) 推荐(0)

摘要:LeetCode: Populating Next Right Pointer in Each NodeGiven a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; ... 阅读全文
posted @ 2014-08-26 22:01 Boostable 阅读(209) 评论(0) 推荐(0)

摘要:LeetCode: pascal's TriangleGiven numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Return[ [1], [1,1], ... 阅读全文
posted @ 2014-08-25 22:24 Boostable 阅读(323) 评论(0) 推荐(0)

摘要:LeetCode: TriangleGiven a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For exa... 阅读全文
posted @ 2014-08-25 22:16 Boostable 阅读(319) 评论(0) 推荐(0)

摘要:LeetCode: Best Time to Buy and Sell StockSay you have an array for which the ith element is the price of a given stock on day i.If you were only permi... 阅读全文
posted @ 2014-08-25 21:58 Boostable 阅读(229) 评论(0) 推荐(0)

摘要:LeetCode: Binary Tree Maximum Path SumGiven a binary tree, find the maximum path sum.The path may start and end at any node in the tree. For example:G... 阅读全文
posted @ 2014-08-25 21:27 Boostable 阅读(148) 评论(0) 推荐(0)

摘要:LeetCode: Valid PalindromeGiven a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A... 阅读全文
posted @ 2014-08-25 21:10 Boostable 阅读(139) 评论(0) 推荐(0)

摘要:LeetCode: Word LadderGiven two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such th... 阅读全文
posted @ 2014-08-24 20:07 Boostable 阅读(280) 评论(0) 推荐(0)

摘要:LeetCode: Longest Consecutive SequenceGiven an unsorted array of integers, find the length of the longest consecutive elements sequence. For example,G... 阅读全文
posted @ 2014-08-24 19:37 Boostable 阅读(283) 评论(0) 推荐(0)

摘要:LeetCode: Sum Root to Leaf NumbersGiven a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is t... 阅读全文
posted @ 2014-08-24 19:27 Boostable 阅读(222) 评论(0) 推荐(0)

摘要:LeetCode: Surrounded RegionsGiven a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'.A region is captured by flipping all 'O's i... 阅读全文
posted @ 2014-08-24 19:15 Boostable 阅读(192) 评论(0) 推荐(0)

摘要:LeetCode: Palindrome PartitionGiven a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome ... 阅读全文
posted @ 2014-08-24 18:56 Boostable 阅读(337) 评论(0) 推荐(0)

摘要:LeetCode: Clone GraphClone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirected graph serializatio... 阅读全文
posted @ 2014-08-23 19:11 Boostable 阅读(191) 评论(0) 推荐(0)

摘要:LeetCode: Gas StationThere are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited ... 阅读全文
posted @ 2014-08-23 18:36 Boostable 阅读(280) 评论(0) 推荐(0)

摘要:LeetCode: CandyThere are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to th... 阅读全文
posted @ 2014-08-23 13:57 Boostable 阅读(201) 评论(0) 推荐(0)

摘要:LeetCode: Single NumberGiven an array of integers, every element appears twice except for one. Find that single one. Note:Your algorithm should have a... 阅读全文
posted @ 2014-08-23 11:56 Boostable 阅读(194) 评论(0) 推荐(0)

摘要:LeetCode: Copy List with Random PointerA linked list is given such that each node contains an additional random pointer which could point to any node ... 阅读全文
posted @ 2014-08-23 11:29 Boostable 阅读(221) 评论(0) 推荐(0)

摘要:LeetCode: Word BreakGiven a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more di... 阅读全文
posted @ 2014-08-22 22:17 Boostable 阅读(297) 评论(0) 推荐(0)

摘要:LeetCode: Linked List CycleGiven a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space?地址:https://oj.... 阅读全文
posted @ 2014-08-22 21:59 Boostable 阅读(340) 评论(0) 推荐(0)

摘要:Foundations of Machine Learning: Boosting Boosting是属于自适应基函数(Adaptive basis-function Model(ABM))中的一种模型。自适应基函数可以表示成:$$f(x)=w_0+\sum_{m=1}^Mw_m\phi_m(x).... 阅读全文
posted @ 2014-08-20 15:49 Boostable 阅读(736) 评论(0) 推荐(0)

摘要:LeetCode: Reorder List Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering ... 阅读全文
posted @ 2014-08-01 10:21 Boostable 阅读(264) 评论(0) 推荐(0)

摘要:LeetCode: Binary Tree Traversal题目:树的先序和后序。后序地址:https://oj.leetcode.com/problems/binary-tree-postorder-traversal/先序地址:https://oj.leetcode.com/problems/... 阅读全文
posted @ 2014-08-01 10:03 Boostable 阅读(221) 评论(0) 推荐(0)

点击右上角即可分享
微信分享提示