Given an array of integers, every element appears three times
except for one. Find that single one.
题意:有一个数组,只有一个数出现一次,其他的都出现三次,找出一次的数
思路:首先我们想到是每次把每一位二进制上1的个数都mod3,然后就能找出一个的了,但是这样空间太大了,所以我们想能记录...
分类:
其他好文 时间:
2015-02-13 22:31:19
阅读次数:
279
#!/bin/bashecho "Bash version ${BASH_VERSION}"for i in {0..10..2}doecho "Wellcom $i times"doneecho "echo 'netstat -anf | grep 8080'"for ((c=1;c<=5;c++...
分类:
其他好文 时间:
2015-02-12 15:55:53
阅读次数:
140
{\rtf1\ansi\ansicpg936\cocoartf1344\cocoasubrtf720 {\fonttbl\f0\froman\fcharset0 Times-Roman;\f1\fnil\fcharset134 STSongti-SC-Regular;} {\colortbl;\re...
分类:
其他好文 时间:
2015-02-10 20:05:48
阅读次数:
238
英文博客地址:http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xiii-dates-and-times中文翻译地址:http://www.pythondoc.com/flask-mega-tutorial/datean...
分类:
其他好文 时间:
2015-02-09 18:11:53
阅读次数:
186
Given an array of sizen, find the majority element. The majority element is the element that appears more than? n/2 ?times.You may assume that the arr...
分类:
其他好文 时间:
2015-02-09 00:45:03
阅读次数:
179
Description
You are given a sequence {A1, A2, ..., AN}. You task is to change all the element of the sequence to 1 with the following operations (you may need to apply it multiple times):
choose...
分类:
其他好文 时间:
2015-02-08 11:36:49
阅读次数:
143
Given an array of size n, find the majority element. The majority element is the element that appears more than ? n/2 ? times.
You may assume that the array is non-empty and the majority element a...
分类:
其他好文 时间:
2015-02-07 14:36:17
阅读次数:
110
The problem:Given an array of sizen, find the majority element. The majority element is the element that appears more than? n/2 ?times.You may assume ...
分类:
其他好文 时间:
2015-02-04 07:04:34
阅读次数:
205
How Many Tables
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)
Total Submission(s) : 14 Accepted Submission(s) : 12
Font: Times New Roman | Verdana | Georgia
...
分类:
其他好文 时间:
2015-02-02 23:18:44
阅读次数:
251
Given an array of size n, find the majority element. Themajority element is the element that appears more than ? n/2
? times.
You may assume that the array is non-empty and the majority element alwa...
分类:
编程语言 时间:
2015-02-02 23:15:34
阅读次数:
255