码迷,mamicode.com
首页 >  
搜索关键字:note    ( 7358个结果
Anagrams
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42744709 Given an array of strings, return all groups of strings that are anagrams. Note: All inputs will be in lower-case. 思路: (1)如果不知道anagrams的意思,很容易将题意理解错了。最开始...
分类:其他好文   时间:2015-01-15 20:27:31    阅读次数:259
[leetcode]99 Recover Binary Search Tree
问题描述: Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Note: A solution using O(n) space is pretty straight forward. Could you...
分类:其他好文   时间:2015-01-15 20:18:55    阅读次数:137
Java-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: The result may be very...
分类:编程语言   时间:2015-01-15 16:13:16    阅读次数:273
[leetcode] Factorial Trailing Zeroes
Factorial Trailing ZeroesGiven an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.思路:不...
分类:其他好文   时间:2015-01-15 15:57:13    阅读次数:158
LeetCode--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 / 3 return [1,2,3]. Note: Recursive soluti...
分类:其他好文   时间:2015-01-15 13:04:35    阅读次数:160
LeetCode--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 / 3 return [3,2,1]. Note: Recursive solut...
分类:其他好文   时间:2015-01-15 13:00:56    阅读次数:141
LeetCode--Single Number
Given 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 without using ext...
分类:其他好文   时间:2015-01-15 11:05:40    阅读次数:207
LeetCode--Single Number II
Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without usi...
分类:其他好文   时间:2015-01-15 11:03:15    阅读次数:157
LeetCode-Minimum Path Sum
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move either down or right at...
分类:其他好文   时间:2015-01-15 09:28:07    阅读次数:124
Single Number
Given 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 without using ext...
分类:其他好文   时间:2015-01-14 23:01:20    阅读次数:402
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!