leetcode
文章平均质量分 60
SENLINZM
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Reverse Words in a String
问题描述 Given an input string, reverse the string word by word. For example, Given s = "the sky is blue", return "blue is sky the". 解决方案public class Solution { public String reverseWord原创 2014-08-31 21:44:35 · 722 阅读 · 0 评论 -
Binary Tree Preorder Traversal
问题描述 Given a binary tree, return the preorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [1,2,3]. Note: Recurs原创 2014-09-02 16:47:02 · 786 阅读 · 0 评论 -
Binary Tree Postorder Traversal
问题描述 Given a binary tree, return the postorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [3,2,1]. Note: Recur原创 2014-09-02 21:07:53 · 723 阅读 · 0 评论 -
Valid Parentheses
问题描述 Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" and "()[]{}"原创 2014-09-02 19:47:04 · 679 阅读 · 0 评论 -
Add Two Numbers
问题描述 You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers原创 2014-09-02 19:04:09 · 844 阅读 · 0 评论 -
Evaluate Reverse Polish Notation
问题描述 解决方案原创 2014-09-01 23:57:17 · 546 阅读 · 0 评论 -
Maximum Depth of Binary Tree
问题描述 Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. 解决方案 /** * Definition fo原创 2014-09-01 22:47:20 · 725 阅读 · 0 评论 -
Pascal's Triangle
问题描述 Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return [ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1] ]原创 2014-09-01 16:37:46 · 652 阅读 · 0 评论 -
Same Tree
问题描述 Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value. 解决原创 2014-09-01 14:35:21 · 712 阅读 · 0 评论 -
Plus One
问题描述 Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is at the head of the list.原创 2014-08-31 21:35:34 · 710 阅读 · 0 评论 -
Valid Palindrome
判断回文字符串原创 2014-08-31 22:49:28 · 882 阅读 · 0 评论 -
Reverse Integer
问题描述 Example1: x = 123, return 321 Example2: x = -123, return -321 Have you thought about this? Here are some good questions to ask before coding. Bonus points for you if you have already原创 2014-09-01 15:10:30 · 667 阅读 · 0 评论 -
Remove Duplicates from Sorted Array
问题描述 解决方案原创 2014-09-02 23:48:00 · 592 阅读 · 0 评论
分享