有了mat、同时我们发现Java有提供jvisualvm,jvisualvm是一个不错的工具: heap dump 、 thread dump、 cpu/mem profile 无所不能。不过观察发现,对同一个java程序,其导出的hrof格式数据跟jmap导出的bin格式数据有所不同,比如Stri...
分类:
编程语言 时间:
2014-07-22 22:50:33
阅读次数:
368
What if the given tree could be any binary tree? Would your previous solution still work?Note:You may only use constant extra space.For example,Given ...
分类:
其他好文 时间:
2014-07-22 08:37:34
阅读次数:
289
What's xxxAn SVM model is a representation of the examples as points in space, mapped so that the examples of the separate categories are divided by a...
分类:
其他好文 时间:
2014-07-21 09:32:31
阅读次数:
284
最小堆的类声明: 1 template 2 class MinHeap 3 { 4 public: 5 MinHeap(ElementType array[], int maxHeapSize); 6 ~MinHeap() { delete [] heap; } 7 int ...
分类:
其他好文 时间:
2014-07-20 08:18:26
阅读次数:
312
Determine whether an integer is a palindrome. Do this without extra space.
判断一个int值是否为回文数。
本题有几点需要注意:
(1)不能用额外存储空间,也就是说只能用常数空间解决;诸如将int转换为string再去比较字符是不可行的;
(2)判断回文数的方法有两个:从中间开始向两头判断、从两头向中间判断;后者更简...
分类:
其他好文 时间:
2014-07-19 23:22:39
阅读次数:
345
Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe...
分类:
其他好文 时间:
2014-07-19 22:36:30
阅读次数:
149
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
分类:
其他好文 时间:
2014-07-19 22:19:36
阅读次数:
202
Linked List CycleGiven a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?算法思路1:快慢指针,当两个指针相遇,则表示有环,...
分类:
其他好文 时间:
2014-07-19 18:38:30
阅读次数:
198
问题:以下是我编译工程后出现的错误: *** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: DATA SEGMENT: _DATA_GROUP_ LENGTH: 0020H Program Si...
分类:
其他好文 时间:
2014-07-19 16:30:07
阅读次数:
272
内存常用的区域分类:栈区(stack)、堆区(heap)、全局区(static区)、文字常量区、程序代码区。栈区:由编译器自动分配和释放,遵循”后进先出“的规则。在函数调用时,第一个进栈的是主函数中的下一条指令地址,然后是函数的各个参数(大多数C编译器中,参数从右往左入栈),然后是函数的局部变量。静...
分类:
其他好文 时间:
2014-07-18 17:23:21
阅读次数:
190