上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 18 下一页
摘要: 题目:Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next po... 阅读全文
posted @ 2014-08-02 23:36 爱做饭的小莹子 阅读(1949) 评论(0) 推荐(0) 编辑
摘要: 题目:Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty spa... 阅读全文
posted @ 2014-08-02 10:39 爱做饭的小莹子 阅读(3547) 评论(0) 推荐(0) 编辑
摘要: 题目: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at a... 阅读全文
posted @ 2014-08-02 10:28 爱做饭的小莹子 阅读(3718) 评论(0) 推荐(1) 编辑
摘要: 题目:You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you... 阅读全文
posted @ 2014-08-02 10:14 爱做饭的小莹子 阅读(5758) 评论(2) 推荐(0) 编辑
摘要: 题目:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is... 阅读全文
posted @ 2014-08-02 10:03 爱做饭的小莹子 阅读(6152) 评论(0) 推荐(1) 编辑
摘要: 题目:You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?题解:这道题就是考察很... 阅读全文
posted @ 2014-08-02 09:09 爱做饭的小莹子 阅读(3170) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999. 题解:这道题跟interger to roman一样都得先熟悉罗马数字的规则。罗... 阅读全文
posted @ 2014-08-02 09:01 爱做饭的小莹子 阅读(2620) 评论(0) 推荐(0) 编辑
摘要: 题目:Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.题解:这道题。。还有哪个roman to integer。。第一件事 就是先把r... 阅读全文
posted @ 2014-08-02 08:43 爱做饭的小莹子 阅读(5011) 评论(0) 推荐(0) 编辑
摘要: 题目:Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Have you thought about this?Here... 阅读全文
posted @ 2014-08-02 08:12 爱做饭的小莹子 阅读(3215) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1... 阅读全文
posted @ 2014-08-02 07:51 爱做饭的小莹子 阅读(2298) 评论(3) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 18 下一页