Question1Power of TwoGiven an integer, write a function to determine if it is a power of two.This question is pretty simple. If a number is a power of...
分类:
其他好文 时间:
2015-07-20 12:47:54
阅读次数:
99
Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer...
分类:
移动开发 时间:
2015-07-20 10:37:56
阅读次数:
130
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 nu...
分类:
其他好文 时间:
2015-07-20 10:37:39
阅读次数:
110
Given an array of integers, every element appearsthreetimes except for one. Find that single one. 1 int singleNumber(int* nums, int numsSize) 2 { 3 .....
分类:
其他好文 时间:
2015-07-20 10:34:13
阅读次数:
121
Write a function that takes an unsigned integer and returns the number of ’1' bits it hasFor example, the 32-bit integer ’11' has binary representatio...
分类:
其他好文 时间:
2015-07-20 10:29:37
阅读次数:
104
//
// main.m
// 猜数
//
#import
#import "Guess.h"
int main(int argc, const char * argv[])
{
Guess * number = [[Guess alloc]init];
NSLog(@"请输入您所猜的数字");
int guessNumber;
scanf("%d",...
分类:
移动开发 时间:
2015-07-20 09:16:37
阅读次数:
134
TheScale-Invariant Feature Transform (SIFT)bundles(捆绑) a feature detector and a feature descriptor.The detector extracts from an image a number of fra...
分类:
其他好文 时间:
2015-07-20 01:13:33
阅读次数:
211
题目描述
链接地址
解法
算法解释题目描述Given 3*n + 1 numbers, every numbers occurs triple times except one, find it.ExampleGiven [1,1,2,3,3,3,2,2,4,1] return 4ChallengeOne-pass, constant extra space.链接地址http://www.lintc...
分类:
其他好文 时间:
2015-07-19 23:39:56
阅读次数:
140
1 #include 2 #define SIXTY 60 3 int main() 4 { 5 int min_number; 6 int hour; 7 int minute; 8 hour = min_number / SIXTY; 9 minute ...
分类:
其他好文 时间:
2015-07-19 23:22:29
阅读次数:
205
Problem Definition: Given a column title as appear in an Excel sheet, return its corresponding column number. For example: A -> 1 B -> 2 C ->...
分类:
其他好文 时间:
2015-07-19 21:20:40
阅读次数:
81