Single Number I
问题描述:
Given an array of integers, every element appears twice except for one. Find that single one.
解题思路:
既然除了某个元素出现一次外,其他所有元素都出现两次,那么可以异或数组的所有元素,得到的结果就是我们所要找的那个元素的值。
class Solu...
分类:
其他好文 时间:
2014-07-30 12:19:53
阅读次数:
184
Find DigitsProblem StatementGiven a number you have to print how many digits in that number exactly divides that number.Input formatThe first line con...
分类:
其他好文 时间:
2014-07-30 11:55:13
阅读次数:
250
1. 按条件查询:db.users.find({"name":"MM1"})2.find的第二个参数可以指定要返回的字段:这里1 表示要显示的字段,0 表示要剔除的字段db.users.find({"name":"MM1"},{"name":1,"age":1})db.users.find({"na...
分类:
数据库 时间:
2014-07-30 11:36:03
阅读次数:
236
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which...
分类:
其他好文 时间:
2014-07-30 11:30:33
阅读次数:
247
通过手写qt代码来认识qt程序的构成,以及特性。设计一个查找对话框。下面是设计过程
1 新建一个empty qt project
2 配置pro文件
HEADERS += Find.h
QT += widgets
SOURCES += Find.cpp main.cpp
3 编写对话框的类
代码如下:
//Find.h
#ifndef FIND_H...
分类:
其他好文 时间:
2014-07-30 10:08:33
阅读次数:
298
问题描述:
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.
Return a deep copy of the list.
解题思路:
将1->2->3->4->NUL...
分类:
其他好文 时间:
2014-07-30 10:07:54
阅读次数:
259
一 Words 1 foible 小缺点,小癖好 e.g. You could do Ebay,or dating or indulge 纵容,沉溺于another foible of choice.你可以上eBay购物,或者约会,或者纵容另外一个弱点。 2 obnoxious 讨厌的 eg. My...
分类:
其他好文 时间:
2014-07-30 07:39:03
阅读次数:
274
分享一个MySQL 自定义函数CREATE FUNCTION的实例。mysql> delimiter $$mysql> CREATE FUNCTION myFunction-> (in_string VARCHAR(255),-> in_find_str VARCHAR(20),-> in_repl...
分类:
数据库 时间:
2014-07-30 07:37:53
阅读次数:
331
题目:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may com....
分类:
编程语言 时间:
2014-07-30 05:35:13
阅读次数:
260
题目:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may com....
分类:
编程语言 时间:
2014-07-30 05:35:03
阅读次数:
309