上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页

Leetcode: Binary Tree Preorder Traversal

摘要: Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].Not... 阅读全文
posted @ 2014-12-04 20:20 Ryan-Xing 阅读(194) 评论(0) 推荐(0) 编辑

Leetcode: Binary Tree Inorder Traversal

摘要: Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].Note... 阅读全文
posted @ 2014-12-04 20:07 Ryan-Xing 阅读(212) 评论(0) 推荐(0) 编辑

Leetcode: Longest Valid Parentheses

摘要: Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest... 阅读全文
posted @ 2014-12-04 19:15 Ryan-Xing 阅读(166) 评论(0) 推荐(0) 编辑

Leetcode: Multiply Strings

摘要: Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-nega... 阅读全文
posted @ 2014-12-04 15:01 Ryan-Xing 阅读(119) 评论(0) 推荐(0) 编辑

Leetcode: Climbing Stairs

摘要: You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb... 阅读全文
posted @ 2014-12-03 23:59 Ryan-Xing 阅读(107) 评论(0) 推荐(0) 编辑

Leetcode: Regular Expression Matching

摘要: Implement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The... 阅读全文
posted @ 2014-12-03 22:14 Ryan-Xing 阅读(149) 评论(0) 推荐(0) 编辑

Leetcode: Restore IP Addresses

摘要: Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"25525511135",return["255.2... 阅读全文
posted @ 2014-12-02 21:45 Ryan-Xing 阅读(120) 评论(0) 推荐(0) 编辑

Leetcode: Roman to Integer

摘要: Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.分析:首先我们熟悉下Roman数字组成规则:罗马数字一共有7个符号,'I':1, 'V'... 阅读全文
posted @ 2014-12-02 20:40 Ryan-Xing 阅读(138) 评论(0) 推荐(0) 编辑

Leetcode: Scramble String

摘要: Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation... 阅读全文
posted @ 2014-12-02 19:39 Ryan-Xing 阅读(169) 评论(0) 推荐(0) 编辑

Leetcode: Simplify Path

摘要: Given an absolute path for a file (Unix-style), simplify it.For example,path="/home/", =>"/home"path="/a/./b/../../c/", =>"/c"click to show corner cas... 阅读全文
posted @ 2014-12-02 17:20 Ryan-Xing 阅读(161) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页