problem: Implement pow(x, n). Hide Tags Math Binary Search 题意:求x的n次幂 </form> thinking: (1)最简单想到的是直观上的数学幂函数求法,測试通过。算法时间复杂度为O(n) (2)依照标签提示,使用二分搜索法。pow(x ...
分类:
其他好文 时间:
2017-07-01 20:05:21
阅读次数:
133
As Easy As A+B Problem Description These days, I am thinking about a question, how can I get a problem as easy as A+B? It is fairly difficulty to do s ...
分类:
编程语言 时间:
2017-06-24 18:27:36
阅读次数:
234
package org.rui.thread.block2; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.concurren ...
分类:
编程语言 时间:
2017-06-22 18:43:07
阅读次数:
302
题目描述 Like everyone else, FJ is always thinking up ways to increase his revenue. To this end, he has set up a series of tolls that the cows will pay wh ...
分类:
其他好文 时间:
2017-06-21 18:20:39
阅读次数:
166
译者按: 近年来,函数式语言的特性都被其它语言学过去了。 原文: Functional Computational Thinking?—?What is a monad? 译者: Fundebug 为了保证可读性,本文采用意译而非直译。另外,本文版权归原作者所有,翻译仅用于学习。 如果你使用函数式编 ...
分类:
其他好文 时间:
2017-06-21 15:04:16
阅读次数:
153
类图的作用:用于展示系统中的类及其相互之间的关系。UML在解决面向对象的方法中对类理解为三个层次,各自是:概念层、说明层、实现层。在UML中,从開始的需求到终于设计类,类图也是环绕这三个层次的观点进行建模的。一、概念层类图在概念层上类图着重于对问题领域的概念化理解。而不是实现,因此类名称通常都是问题 ...
分类:
其他好文 时间:
2017-06-19 14:15:01
阅读次数:
105
Thinking in States Niclas Nilsson PEOPLE IN THE REAL WORLD HAVE A WEIRD RELATIONSHIP WITH STATE. This morning, I stopped by the local store to prepare ...
分类:
其他好文 时间:
2017-06-18 15:12:21
阅读次数:
150
package org.rui.thread.newc.semaphore; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Semaphore; /** * 同意N个任务同一时候訪问这个资 ...
分类:
编程语言 时间:
2017-06-13 14:16:45
阅读次数:
200
java 并发原子性与易变性 具体介绍请參阅thinking in java4 21.3.3 thinking in java 4免费下载:http://download.csdn.net/detail/liangrui1988/7580155 package org.rui.thread.vola ...
分类:
编程语言 时间:
2017-06-10 10:39:23
阅读次数:
197
首先解释一下吸血鬼数字:吸血鬼数字是指位数为偶数的数字,可由一对数字相乘而得到,这对数字各包含乘积的一半位数的数字,以两个0结尾的数字是不允许的。 四位数吸血鬼数字示例:1260=21*60,1827=21*87,2187=27*81…… 先列出结果:一共7个:1260=21*60,1395=15* ...
分类:
编程语言 时间:
2017-06-06 10:37:10
阅读次数:
261