Given amxngrid filled with non-negative
numbers, find a path from top left to bottom right whichminimizesthe sum of all
numbers along its path.Note:Yo...
分类:
其他好文 时间:
2014-06-04 20:57:08
阅读次数:
360
Given two numbers represented as strings,
return multiplication of the numbers as a string.Note: The numbers can be
arbitrarily large and are non-nega...
分类:
其他好文 时间:
2014-06-04 20:19:04
阅读次数:
313
1. / – RootEvery single file and directory
starts from the root directory.Only root user has write privilege under this
directory.Please note that /ro...
分类:
系统相关 时间:
2014-06-04 20:04:22
阅读次数:
416
Given a set of distinct integers,S, return all
possible subsets.Note: Elements in a subset must be in non-descending order. The
solution set m...
分类:
其他好文 时间:
2014-06-04 20:01:32
阅读次数:
340
Given an array of strings, return all groups of
strings that are anagrams.Note: All inputs will be in
lower-case.classSolution{public:vectoranagrams(v...
分类:
其他好文 时间:
2014-06-04 19:29:39
阅读次数:
247
Given a collection of integers that might
contain duplicates,S, return all possible subsets.Note: Elements in a subset
must be in non-descending o...
分类:
其他好文 时间:
2014-06-04 18:37:55
阅读次数:
322
Given two sorted integer arrays A and B, merge
B into A as one sorted array.Note:You may assume that A has enough space (size
that is greater or equal...
分类:
其他好文 时间:
2014-06-04 18:18:08
阅读次数:
259
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 ...
分类:
其他好文 时间:
2014-06-03 13:53:21
阅读次数:
309
Given an array of integers, every element
appearstwiceexcept for one. Find that single one.Note:Your algorithm should have
a linear runtime complexity...
分类:
其他好文 时间:
2014-05-30 16:16:29
阅读次数:
190
Given inorder and postorder traversal of a
tree, construct the binary tree.Note:You may assume that duplicates do not exist
in the tree./** * Definiti...
分类:
其他好文 时间:
2014-05-30 16:12:22
阅读次数:
288