- 博客(17)
- 资源 (2)
- 收藏
- 关注
原创 Java Hashtable的实现
先附源码:/* * Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * *
2014-12-30 16:39:56 1596
转载 tomcat之Session的管理
Session是由服务器端的应用服务器容器(如Tomcat、Jetty)存储的。下面分析一下Tomcat是如何管理Session的。转自:tomcat架构分析 (Session管理)Tomcat中主要由每个context容器内的一个Manager对象来管理session。对于这个manager对象的实现,可以根据tomcat提供的接口或基类来自己定制,同时,tomcat也提供了标准实现
2014-12-28 20:21:04 1023
原创 Find Peak Element
A peak element is an element that is greater than its neighbors.Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.The array may contain multiple peaks, i
2014-12-22 20:49:52 632
原创 https://oj.leetcode.com/problems/majority-element/
Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element al
2014-12-22 18:39:29 732
原创 Excel Sheet Column Title
Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB Credits
2014-12-22 18:34:50 863
原创 Search a 2D Matrix
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted from left to right.The first integer of each
2014-12-17 18:51:51 734
原创 Sort Colors
Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will use the integers
2014-12-17 18:35:48 718
转载 ubuntu14.04 安装 hadoop2.4.0
转载:ubuntu搭建hadoop-Ver2.6.0完全分布式环境笔记自己在搭建hadoop平台时,碰到一些困难,按照该博文解决了问题,转载一下,作为记录。2 先决条件确保在你集群中的每个节点上都安装了所有必需软件:JDK ,ssh,Hadoop3 实验环境搭建3.1 准备工作操作系统:Ubuntu
2014-12-16 10:37:40 1042
原创 Search in Rotated Sorted Array
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to search. If found in the array retur
2014-12-10 19:25:07 653
原创 Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your algorithm should use only constant space. Y
2014-12-08 19:23:43 681
原创 shared jedis 在spring中的配置
<bean id="shardedJedis" factory-bean="shardedJedisPool" factory-method="getResource" />
2014-12-07 09:55:20 2183
原创 快排查找第K小的数
#include "iostream.h"using namespace std;int findMedian(int *A,int left,int right){ int center = (left+right)/2; if(A[left]>A[center]){ swap(A[left],A[center]); } if(A[left]>A[right]){ swap(
2014-12-05 19:53:19 1321
原创 归并排序
#include "iostream.h"using namespace std;void merge(int A[], int Tmp[], int leftStart,int rightStart, int rightEnd){ int number = rightEnd-leftStart+1; int leftEnd = rightStart-1; int left=leftSt
2014-12-04 19:33:14 676
原创 堆排序(最大堆)
#include "iostream.h"using namespace std;//因为i从0开始 #define LeftChild(i) (2*(i)+1)//i-N范围内,创建最大堆 void maxHeap(int A[], int i, int N){ int tmp; int child; for(tmp=A[i];LeftChild(i)<N;i=child){
2014-12-04 18:45:23 860
原创 Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, whe
2014-12-03 20:27:26 696
原创 Intersection of Two Linked Lists
Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a1 → a2 ↘
2014-12-03 19:17:35 701
jQueryFileUploadMaster 插件 spring mvc简单整合
2013-08-16
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人