560 Subarray Sum Equals K

560-Subarray Sum Equals K 题目:Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. Example 1: Input:nums = [1,1,1], k = 2 Output: 2 The length of the array is in range [1, 20,000]. The range of numbers in the array is [-1000, 1000] and the range of the

一次关于CompletionService的使用

背景 最近在项目里需要实现这样一个接口:从多个数据源分别查询不同的数据,再将所有的结果组装在一起,返回最终结果。本身上没有什么难点,只是这一段

621 Task Cheduler

621-Task Scheduler 题目:Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different tasks. Tasks could be done without original order.Each task could be done in one interval. For each interval, CPU could finish one task or just be idle. However, there is a non-negative cooling interval n that means between two

647 Palindromic Substrings

647-Palindromic Substrings 题目:Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are counted as different substrings even they consist of same characters. Example 1: Input: “abc” Output: 3 Explanation: Three palindromic strings: “a”, “b”, “c”. Example 2: Input: “aaa” Output: 6 Explanation: Six palindromic strings: “a”, “a”, “a”,

739 Daily Temperatures

739-dailyTemperatures 题目:Given a list of daily temperatures T, return a list such that, for each day in the input, tells you how many days you would have to wait until a warmer temperature. If there is no future day for which this is possible, put 0 instead. For example, given the list of temperatures T = [73, 74, 75, 71, 69, 72, 76,

对paxos的一些理解

由于最近需要在组内做一个分享,而且Spring那块我还没搞完,就打算选paxos的一些问题来梳理理解一下,这也就是技术分享的最大好处,需要你

Spring 4.x 阅读笔记(五)

第八章 基于AspectJ和Schema的AOP 基于注解的方式比上一章继承扩展各种类和接口要方便多了,首推的是这种方式。

Spring 4.x 阅读笔记(四)

第七章 Spring AOP基础 Aspect Oriented Programming,我们无法通过抽象父类的方式来消除一些重复的横切代码,AOP是通过横向抽取机制来进行抽象的。AO

Spring 4.x 阅读笔记(三)

第五章 在IOC容器中装配Bean Spring启动时读取应用程序提供的Bean配置信息,并在Spring容器中生成一份相应的Bean配置注册表

Spring 4.x 阅读笔记(二)

第四章 IOC Inverse Of Control:某一接口具体实现类的选择控制权从 调用类 中移除,转交给第三方,即Spring容器(利用Bean配置来控制) 这其实是