码迷,mamicode.com
首页 >  
搜索关键字:leedcode    ( 225个结果
[leedcode 120] Triangle
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 fol...
分类:其他好文   时间:2015-07-23 00:16:27    阅读次数:187
[leedcode 119] Pascal's Triangle II
Given an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].public class Solution { public List getRow(int ro...
分类:其他好文   时间:2015-07-22 22:39:15    阅读次数:150
[leedcode 116] Populating Next Right Pointers in Each Node
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointe...
分类:其他好文   时间:2015-07-22 22:23:45    阅读次数:166
[leedcode 118] Pascal's Triangle
GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]...
分类:其他好文   时间:2015-07-22 22:16:08    阅读次数:105
[leedcode 117] Populating Next Right Pointers in Each Node II
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 stil...
分类:其他好文   时间:2015-07-22 22:11:30    阅读次数:101
[leedcode 115] Distinct Subsequences
Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the orig...
分类:其他好文   时间:2015-07-22 22:08:27    阅读次数:88
[leedcode 112] Path Sum
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.Fo...
分类:其他好文   时间:2015-07-22 20:20:26    阅读次数:129
[leedcode 110] Balanced Binary Tree
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 depth...
分类:其他好文   时间:2015-07-22 01:31:38    阅读次数:118
[leedcode 108] Convert Sorted Array to Binary Search Tree
Given an array where elements are sorted in ascending order, convert it to a height balanced BST./** * Definition for a binary tree node. * public cla...
分类:其他好文   时间:2015-07-21 23:53:37    阅读次数:176
[leedcode 109] Convert Sorted List to Binary Search Tree
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST./** * Definition for singly-linked list. ...
分类:其他好文   时间:2015-07-21 23:47:06    阅读次数:145
225条   上一页 1 ... 11 12 13 14 15 ... 23 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!