//Situation System prompts"xxx is not in the sudoers file"(xxx equals the user name)while executing command "sudo": sudo-i Password: xxx ...
分类:
其他好文 时间:
2014-07-06 21:39:36
阅读次数:
175
今天import a project, 编译时提示Type R is already defined error, google, stackoverflow, 找到一个solution,"The type R is already defined"That's the message you ge...
分类:
其他好文 时间:
2014-07-06 18:04:39
阅读次数:
168
Implementint sqrt(int x).Compute and return the square root ofx.public class Solution { public int sqrt(int x) { if(x < 0) return -1; if(x =...
分类:
其他好文 时间:
2014-07-06 17:37:30
阅读次数:
150
class Solution {public: vector plusOne(vector &digits) { int carry = 1; int len = digits.size(); vector res; ...
分类:
其他好文 时间:
2014-07-06 16:43:39
阅读次数:
104
N-Queens IIFollow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.solution:#includ...
分类:
其他好文 时间:
2014-07-06 16:06:08
阅读次数:
198
class Solution {public: vector restoreIpAddresses(string s) { vector ips; vector ip; dfs(s, 0, ip, ips); return ips; ...
分类:
其他好文 时间:
2014-07-06 16:03:21
阅读次数:
276
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.public class Solution { public...
分类:
其他好文 时间:
2014-07-06 13:50:22
阅读次数:
153
Write a function to find the longest common prefix string amongst an array of strings.class Solution {public: string longestCommonPrefix(vector &st...
分类:
其他好文 时间:
2014-07-05 18:36:22
阅读次数:
209
Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous solution stil...
分类:
其他好文 时间:
2014-07-03 20:34:46
阅读次数:
193
Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.class Solution...
分类:
其他好文 时间:
2014-07-03 20:25:21
阅读次数:
219