下面是题解,做的不好。下一步的目标是rating涨到 1800,没打过几次cfA. Face DetectionAuthor:MonyuraOne should iterate through each 2x2 square and check if it is possible to rearra...
分类:
其他好文 时间:
2015-06-07 21:23:51
阅读次数:
128
Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity.这道题需要在对数时间内求解阶乘中尾端0的个数。阶乘中0的个数是由各项因子中2和5的个数决定的,又由于阶乘是连续n的数的积,所以2的数目比5的数目多,故0的...
分类:
其他好文 时间:
2015-06-07 15:53:47
阅读次数:
88
Merge k Sorted Lists
题目:
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 题意:
合并k个已经排序过的链表。 思路:...
分类:
其他好文 时间:
2015-06-07 13:55:16
阅读次数:
150
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.
get(key) - Get the value (will always be positive) of the key if ...
分类:
系统相关 时间:
2015-06-07 11:10:42
阅读次数:
144
/*! Welcome to Compass. * In this file you should write your main styles. (or centralize your imports) * Import this file using the following HTML or ...
分类:
其他好文 时间:
2015-06-07 01:00:48
阅读次数:
139
MySql创建用户(包括密码)时,会提示ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number; 问题原因:你输入的密码是明文。不允许这么输入。 解决办法:用select password(‘你想输入的...
分类:
其他好文 时间:
2015-06-06 22:14:02
阅读次数:
177
#!/usr/bin/python
import re
def pre_process_msg ( msgIn ):
if msgIn=="":
return "msgIn_Input_Error,should'nt Null, it is Strings"
else:
#1 trim
msg = msgIn
...
分类:
编程语言 时间:
2015-06-06 20:49:17
阅读次数:
367
Contains DuplicateGiven 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 should return false if...
分类:
其他好文 时间:
2015-06-06 18:15:25
阅读次数:
494
题目:
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the target,w...
分类:
其他好文 时间:
2015-06-06 14:59:04
阅读次数:
124
Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity...
分类:
其他好文 时间:
2015-06-06 13:18:38
阅读次数:
123