Leetcode
One2zeror
这个作者很懒,什么都没留下…
展开
-
Leetcode题解(8):L179/Largest Number
L179:Largest Number Given a list of non negative integers, arrange them such that they form the largest number. For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330. Note: Th原创 2015-06-17 19:40:17 · 768 阅读 · 0 评论 -
Leetcode题解(2):L93/Restore IP Addresses
L93: Restore IP Addresses Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example: Given “25525511135”,return [“255.255.11.135”, “255.2原创 2015-06-05 20:16:02 · 791 阅读 · 0 评论 -
Leetcode题解(1):L102/Binary Tree Level Order Traversal
L102: 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,#原创 2015-06-05 18:52:39 · 620 阅读 · 0 评论 -
Leetcode题解(4):L216/Combination Sum III
L216: Combination Sum III Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be a unique set of number原创 2015-06-08 14:32:39 · 839 阅读 · 0 评论 -
Leetcode题解(5):L58/Length of Last Word
L58: Length of Last Word Given a string s consists of upper/lower-case alphabets and empty space characters ’ ‘, return the length of last word in the string. If the last word does not exist, retur原创 2015-06-08 15:48:22 · 895 阅读 · 0 评论 -
Leetcode题解(3):L215/Kth Largest Element in an Array
L215: Kth Largest Element in an Array Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example, Gi原创 2015-06-06 21:15:23 · 811 阅读 · 0 评论 -
Leetcode题解(6):L103/Binary Tree Zigzag Level Order Traversal
L103: Binary Tree Zigzag Level Order Traversal Given a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from left to right, then right to left for the next level and原创 2015-06-08 19:06:35 · 498 阅读 · 0 评论 -
Leetcode题解(7)L51/N-Queens
L51: N-Queens The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all distinct solutions to the n-qu原创 2015-06-09 14:17:20 · 696 阅读 · 0 评论