![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
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 · 662 阅读 · 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 / 3return [1,2,3].Note: Recurs原创 2014-09-02 16:47:02 · 723 阅读 · 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 / 3return [3,2,1].Note: Recur原创 2014-09-02 21:07:53 · 649 阅读 · 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 · 616 阅读 · 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 · 776 阅读 · 0 评论 -
Evaluate Reverse Polish Notation
问题描述解决方案原创 2014-09-01 23:57:17 · 504 阅读 · 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 · 667 阅读 · 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 · 598 阅读 · 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 · 656 阅读 · 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 · 647 阅读 · 0 评论 -
Valid Palindrome
判断回文字符串原创 2014-08-31 22:49:28 · 829 阅读 · 0 评论 -
Reverse Integer
问题描述Example1: x = 123, return 321Example2: x = -123, return -321Have 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 · 614 阅读 · 0 评论 -
Remove Duplicates from Sorted Array
问题描述解决方案原创 2014-09-02 23:48:00 · 517 阅读 · 0 评论