LeetCode
文章平均质量分 65
gloomysnow
这个作者很懒,什么都没留下…
展开
-
LeetCode 217. Contains Duplicate
package com.gloomy.leetcode;/** * Given an array of integers, find if the array contains any duplicates. Your * function should return true if any value appears at least twice in the array, * and it原创 2016-05-01 23:55:55 · 314 阅读 · 0 评论 -
LeetCode 104. Maximum Depth of Binary Tree
package com.gloomy.leetcode;import java.util.ArrayDeque; import java.util.Queue;/** * 题目描述 * * Given a binary tree, find its minimum depth.The minimum depth is the number * of nodes along the原创 2016-05-01 23:57:53 · 247 阅读 · 0 评论 -
LeetCode 242. Valid Anagram
package com.gloomy.leetcode;/** * Given two strings s and t, write a function to determine if t is an anagram * of s. * * For example, s = “anagram”, t = “nagaram”, return true. s = “rat”, t =原创 2016-05-01 23:59:54 · 229 阅读 · 0 评论 -
LeetCode 13. Roman to Integer
package com.gloomy.leetcode;import java.util.HashMap;/** * 罗马数字转换为阿拉伯数字 * * @author 52sqz 罗马数字是阿拉伯数字传入之前使用的一种数码 * 。罗马数字采用七个罗马字母作数字,即Ⅰ(1)、X(10)、C(100)、M(1000 * )、V(5)、L(50)、D(500)M原创 2016-05-02 01:02:33 · 292 阅读 · 0 评论 -
Leetcode 112. Path Sum
package com.gloomy.leetcode;/** * Given a binary tree and a sum, determine if the tree has a root-to-leaf path * such that adding up all the values along the path equals the given sum. * * @au原创 2016-05-03 20:31:47 · 323 阅读 · 0 评论 -
31. Next Permutation
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the lowest possible orde原创 2016-06-22 14:52:17 · 436 阅读 · 0 评论