Problem Description:
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
Do not allocate extra space for another array, you ...
分类:
其他好文 时间:
2014-08-01 00:08:50
阅读次数:
274
IntroductionThis article will explain six important concepts: stack, heap, value types, reference types, boxing, and unboxing. This article starts exp...
分类:
Web程序 时间:
2014-07-31 23:10:30
阅读次数:
397
1.ASCII 返回与指定的字符对应的十进制数;SQL>select ascii('A') A,ascii('a') a,ascii('0') zero,ascii(' ') space from dual;2.chr 给出整数,返回对应的字符;SQL>select chr(55203) zhu,c...
分类:
数据库 时间:
2014-07-31 20:11:57
阅读次数:
306
java.lang.OutOfMemoryError: PermGen space这个错误是指内存的永久保存区域,它主要存放的是Class和Meta信息,在Class被loader(加载时)就会放到PermGen space中,这块区域不会被GC定时清理,这个错误经常发生在web服务器在对JSP进行...
分类:
编程语言 时间:
2014-07-31 19:59:07
阅读次数:
252
题目链接:Building a Space Station
最小生成树的模板题,prim和kuruskal都可以,但是要注意精度损失。
题意:给定一个三维坐标系,给定一些圆的圆心坐标,和半径,求出所有圆心构成的最小生成树;
特别注意:两个圆如果相交在一起,算做联通,距离为0;
C++提交
#include
#include
#include
#include
#include
...
分类:
其他好文 时间:
2014-07-31 17:06:56
阅读次数:
215
最近回头看了一下书,对内存的理解又有新的认识。我所关注的内存里面说没有寄存器的,所以我关注的只有 托管堆(heap),栈(stack), 字符串常量池(string是一个很特殊的对象)首先我们看两个方法: void M1() { string nam...
分类:
其他好文 时间:
2014-07-31 16:40:56
阅读次数:
137
Building a Space Station
Time Limit: 1000MS Memory Limit: 30000K
Total Submissions: 4400 Accepted: 2255
Description
You are a member of the space station engineering team, and are assigned a tas...
分类:
其他好文 时间:
2014-07-31 13:18:36
阅读次数:
280
无论怎么小心,想完全避免bad code是不可能的,此时就需要一些工具来帮助我们检查代码中是否存在会造成内存泄漏的地方。Android tools中的DDMS就带有一个很不错的内存监测工具Heap,本文讲解了如何使用Heap来进行内存监测。内存监测工具 DDMS --> Heap这里我使用eclip...
分类:
移动开发 时间:
2014-07-31 13:11:06
阅读次数:
207
一、二叉堆含义及属性: 堆(heap)亦被称为:优先队列(priority queue),是计算机科学中一类特殊的数据结构的统称。堆通常是一个可以被看做一棵完全二叉树的数组对象。在队列中,调度程序反复提取队列中第一个作...
分类:
其他好文 时间:
2014-07-31 10:02:36
阅读次数:
470
复杂度:实现: 1 #ifndef LEFTIST_HEAP_H 2 #define LEFTIST_HEAP_H 3 4 #include "dsexceptions.h" 5 #include 6 using namespace std; 7 8 // Leftist he...
分类:
其他好文 时间:
2014-07-31 09:35:36
阅读次数:
236