![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
HeyuHxm
这个作者很懒,什么都没留下…
展开
-
104.Maximum Depth of Binary Tree
104.Maximum Depth of Binary TreeGiven 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.` /**原创 2017-04-26 14:01:33 · 239 阅读 · 0 评论 -
383.Ransom Note
383. Ransom NoteGiven an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed from the原创 2017-05-08 13:55:34 · 430 阅读 · 0 评论 -
Single Number
136. Single NumberGiven an array of integers, every element appears twice except for one. Find that single one.Note: Your algorithm should have a linear runtime complexity. Could you implement it with原创 2017-04-25 10:43:54 · 349 阅读 · 0 评论 -
292.Nim Game
292. Nim GameYou are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone原创 2017-04-25 10:43:28 · 291 阅读 · 0 评论 -
Reverse String
344. Reverse StringWrite a function that takes a string as input and returns the string reversed.Example: Given s = “hello”, return “olleh”.` public class Solution { public String reverseS原创 2017-04-25 10:43:03 · 312 阅读 · 0 评论 -
463.Island Perimeter
463. Island Perimeter 海岛周长You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/vertically (not diagonally)原创 2017-04-25 09:36:54 · 326 阅读 · 0 评论 -
412.FizzBuzz
412. Fizz BuzzWrite a program that outputs the string representation of numbers from 1 to n.But for multiples of three it should output “Fizz” instead of the number and for the multiples of five output原创 2017-04-25 09:33:23 · 260 阅读 · 0 评论 -
Move Zeroes
leetcode原创 2017-05-04 13:42:07 · 327 阅读 · 0 评论 -
Invert Binary Tree
leetcode原创 2017-05-04 13:41:46 · 255 阅读 · 0 评论 -
Assign Cookies
Assign CookiesAssume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor gi, which is the minimum原创 2017-04-26 14:02:12 · 191 阅读 · 0 评论 -
389.Find the Difference
389.Find the DifferenceGiven two strings s and t which consist of only lowercase letters.String t is generated by random shuffling string s and then add one more letter at a random position.Find the le原创 2017-04-26 14:01:57 · 248 阅读 · 0 评论 -
453. Minimum Moves to Equal Array Elements
453. Minimum Moves to Equal Array ElementsGiven a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal, where a move is incrementing n - 1 eleme原创 2017-05-08 13:55:55 · 248 阅读 · 0 评论