![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java & JDBC
文章平均质量分 76
xiaozhuaixifu
这个作者很懒,什么都没留下…
展开
-
【Union Find】JAVA implementation
import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.Scanner; class UF { private int[] id; private int count; public UF(int N) { count = N; id = n原创 2014-05-03 16:32:16 · 1501 阅读 · 0 评论 -
【LeetCode】LRU Cache
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. get(key) - Get the value (will always be positive) of the key if t原创 2014-05-19 08:54:49 · 920 阅读 · 0 评论 -
【InversionCount 逆序对数 + MergeSort】
Definition of Inversion: Let (A[0], A[1] ... A[n], n A[j], then the pair (i, j) is called inversion of A. Example: Count(Inversion({3, 1, 2})) = Count({3, 1}, {3, 2}) = 2 思路,如果用brute force,则O(n^2)原创 2014-04-26 22:02:10 · 1746 阅读 · 0 评论 -
【微软编程一小时】题目1 : Arithmetic Expression
时间限制:2000ms 单点时限:200ms 内存限制:256MB 描述 Given N arithmetic expressions, can you tell whose result is closest to 9? 输入 Line 1: N (1 Line 2..N+1: Each line contains an expression in the f原创 2014-04-28 18:54:25 · 1129 阅读 · 0 评论