題目 : Given an integer array nums, find the contiguous subarray(containing at least one number) which has the largest sum and return its sum. Example:I ...
分类:
编程语言 时间:
2019-02-23 01:11:32
阅读次数:
263
Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: ...
分类:
其他好文 时间:
2019-02-18 18:42:41
阅读次数:
152
Join 题目链接:https://vjudge.net/problem/URAL-1627 Description: Businessman Petya recently bought a new house. This house has one floor with n × m square ...
分类:
其他好文 时间:
2019-02-17 22:19:57
阅读次数:
230
一、分布式算法 在做服务器负载均衡时候可供选择的负载均衡的算法有很多,包括: 轮循算法(Round Robin)、哈希算法(HASH)、最少连接算法(Least Connection)、响应速度算法(Response Time)、加权法(Weighted )等。其中哈希算法是最为常用的算法。 典型的 ...
分类:
编程语言 时间:
2019-02-17 12:43:08
阅读次数:
199
ThreadLocal 使用场景 使用场景是在于同一个类,但是会开多个线程执行,但是每一个线程可以保持不同的变量状态。 做法如上图,线程类 有成员变量 ,用来存储该线程中的所有的 变量,初始化是一个 数组。 内存泄漏 继承于 ,简单说一下四种引用。强引用,就是我们常规使用的new出来一个对象,这时候 ...
分类:
其他好文 时间:
2019-02-15 19:42:32
阅读次数:
137
Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product. Example 1: E ...
分类:
其他好文 时间:
2019-02-15 01:05:13
阅读次数:
201
How often have you heard the saying, "Stop and smell the roses?" Odds are, you've come across it at least a few times. Your best friends have likely s ...
分类:
其他好文 时间:
2019-02-13 09:22:44
阅读次数:
159
Update:有问题请私信我,我会在4848小时内回复。 概念 最近公共祖先问题:简称LCALCA(Least Common AncestorsLeastCommonAncestors),指的给出一棵有根多叉树,询问x,yx,y的最近公共祖先。 例如上图中,44和33的LCALCA是22,88和33 ...
分类:
其他好文 时间:
2019-02-12 13:05:38
阅读次数:
135
CMPUT 379, Assignment 1, Winter 2019University of Alberta / Department of Computing ScienceInstructor: Ioanis Nikolaidis (nikolaidis@ualberta.ca)(UNIX ...
分类:
其他好文 时间:
2019-02-09 21:07:46
阅读次数:
166
Description First we define: (1) $lcm(a,b)$, the least common multiple of two integers $a$ and $b$, is the smallest positive integer that is divisible ...
分类:
其他好文 时间:
2019-02-09 12:05:06
阅读次数:
158