leetcode
泡泡沫沫
这个作者很懒,什么都没留下…
展开
-
[leetcode] 127. Word Ladder
Same Tree描述Given two words (beginWord and endWord), and a dictionary’s word list, find the length of shortest transformation sequence from beginWord to endWord, such that: 1.Only one letter can be ch原创 2017-03-17 19:30:26 · 264 阅读 · 0 评论 -
[leetcode] 2. Add Two Numbers(链表、大数相加)
Add Two Numbers描述 You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two n原创 2017-08-17 10:45:00 · 319 阅读 · 0 评论 -
[leetcode] 43. Multiply Strings(大数相乘)
Multiply Strings描述 Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2. Note: 1. The length of both num1 and num2 is < 110. 2. Both n原创 2017-08-16 21:39:55 · 224 阅读 · 0 评论 -
[leetcode] 84. Largest Rectangle in Histogram
Largest Rectangle in Histogram原创 2017-04-17 10:36:56 · 188 阅读 · 0 评论 -
[leetcode] 107. Binary Tree Level Order Traversal II
Binary Tree Level Order Traversal II描述Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left to right, level by level from leaf to root).For example: Give原创 2017-03-17 11:15:21 · 151 阅读 · 0 评论 -
[leetcode] 102. Binary Tree Level Order Traversal
Binary Tree Level Order Traversal描述 Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).For example: Given binary tree [3,9,20,null,原创 2017-03-17 10:55:50 · 155 阅读 · 0 评论 -
[leetcode] 199. Binary Tree Right Side View
Binary Tree Right Side View描述 Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.For example: Given the fo原创 2017-03-17 09:17:14 · 147 阅读 · 0 评论 -
513. Find Bottom Left Tree Value
Find Bottom Left Tree Value描述Given a binary tree, find the leftmost value in the last row of the tree.Example 1: Input: 2 / \ 1 3Output: 1Example 2: Input: 1 / \ 2 3 /原创 2017-03-16 21:09:54 · 581 阅读 · 0 评论 -
[leetcode] 515. Find Largest Value in Each Tree Row
Find Largest Value in Each Tree Row描述 You need to find the largest value in each row of a binary tree. Example: Input: 1 / \ 3 2 / \ \ 5 3 9 Output: [1, 3原创 2017-03-16 16:40:35 · 154 阅读 · 0 评论 -
[leetcode] 529. Minesweeper
[leetcode] 529. Minesweeper描述 就是大家都玩过的扫雷游戏 题目链接529. Minesweeper分析 题目很简单,读懂规则就好,只用点击一次,而且给你的输入要么是点击’M’,要么是’E’。’M’的处理很简单。 碰到’E’的处理: 1.首先统计周围8领域有没有地雷,如果有,则置为相应的数目,返回; 2.如果周围没有地雷,对领域点深搜,还是原创 2017-03-16 14:45:25 · 251 阅读 · 0 评论 -
[leetcode] 354. Russian Doll Envelopes
Same Tree描述 You have a number of envelopes with widths and heights given as a pair of integers (w, h). One envelope can fit into another if and only if both the width and height of one envelope is gr原创 2017-04-11 13:41:52 · 175 阅读 · 0 评论 -
[leetcode] 100. Same Tree
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原创 2017-03-07 15:22:23 · 158 阅读 · 0 评论 -
[leetcode] 257. Binary Tree Paths
* Binary Tree Paths*描述 Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1 / \ 2 3 \ 5 All root-to-leaf pat原创 2017-03-07 16:44:10 · 218 阅读 · 0 评论 -
[leetcode] 415. Add Strings(大数相加)
Add Strings描述Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note 1.The length of both num1 and num2 is < 5100. 2.Both num1 and num2 contai原创 2017-08-17 20:27:12 · 270 阅读 · 0 评论