码迷,mamicode.com
首页 >  
搜索关键字:integer    ( 14932个结果)
leetcode——First Missing Positive
题目: Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. Your algorithm should run in O(n) time and uses...
分类:其他好文   时间:2015-02-04 16:33:15    阅读次数:149
PAT1005.Spell It Right
Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English. Input Specificat...
分类:其他好文   时间:2015-02-04 16:10:53    阅读次数:149
EditText控件
限制输入字符个数: public?class?EditTextWithLimitChar?extends?EditText?{ ?private?int?NUM_MAX_CHAR?=?Integer.MAX_VALUE;?//?默认字数无限制 ?private?int?sum?=?0;?//?记录已经输入的总...
分类:其他好文   时间:2015-02-04 11:13:09    阅读次数:146
Delphi临界区的使用
在开发一个平板点餐软件后台订单打印程序时,使用线程订单打印,为防打印阻塞使用临界区。类:type MYPARA=record title:pchar; //标题 str:pchar; flag:integer; //标志 end; PMYPARA=^MYPARA;变量: ThreadId1:DWOR...
分类:Windows程序   时间:2015-02-03 18:51:59    阅读次数:196
利用Jsonarray拼接sql
functiongetjsontoWhereSql(constajsonarray:TJSONArray):string;vari:Integer;ajsonobject:TJSONObject;afieldname,afieldvalue:string;sqlwherestring:string;afieldoperator:string;beginsqlwherestring:=‘‘;fori:=0toajsonarray.Size-1dobeginajsonobject:=ajsonarray.Get(..
分类:数据库   时间:2015-02-03 15:16:38    阅读次数:345
codechef 2014/12
总是只能做4、5题,要加油啊!1. XORSUBYou are given an array A of N integers and an integer K. Your task is to return the maximum possible value of F(P) xor K, wher...
分类:其他好文   时间:2015-02-03 14:44:15    阅读次数:159
rails数据库查询 N + 1 查询的解决办法
schema.rbActiveRecord::Schema.define(version: 20150203032005) do create_table "addresses", force: true do |t| t.integer "client_id" t.string ...
分类:数据库   时间:2015-02-03 12:29:16    阅读次数:208
leetcode 172: Factorial Trailing Zeroes
Given an integer?n, return the number of trailing zeroes in?n!. Note:?Your solution should be in logarithmic time complexity. Credits: Special thanks to?@ts ?for adding this problem and creat...
分类:其他好文   时间:2015-02-03 11:23:32    阅读次数:125
[LeetCode]Roman to Integer
Q:Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 该题是要将罗马数字转换成integer。罗马数字的定义可见维基百科:Roman numerals . 罗马数字是基于下面7个符号: 罗马数字的1...
分类:其他好文   时间:2015-02-03 11:09:32    阅读次数:152
41. First Missing Positive Leetcode Python
Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. Your algorithm should run in O(n) time and uses cons...
分类:编程语言   时间:2015-02-03 09:33:48    阅读次数:206
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!