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 must do this in place with...
分类:
其他好文 时间:
2015-01-11 14:55:05
阅读次数:
164
Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space?题意判...
分类:
其他好文 时间:
2015-01-11 14:44:45
阅读次数:
160
a*b^n(mod(b-1) =a(mod(b-1)http://acm.timus.ru/problem.aspx?space=1&num=1104 1 #include 2 #include 3 4 char str[1000000 + 10]; 5 6 int CharToInt(ch...
分类:
其他好文 时间:
2015-01-10 16:29:36
阅读次数:
185
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...
分类:
其他好文 时间:
2015-01-10 13:57:24
阅读次数:
119
name"Esp"bind"TAB""+showscores"bind"ENTER""+attack"bind"ESCAPE""cancelselect"bind"SPACE""+jump"bind"MWHEELDOWN""+jump"bind"0""slot10"bind"1""slot1"bin
分类:
其他好文 时间:
2015-01-10 00:59:47
阅读次数:
352
在linux系统中,许多元字符,如分号(semicolon),空格(space),反斜线(backslash),美元符号(dollarsigh),问号(questionmark),星号(asterisk)通常被解释为命令,-(dashes)或者--被解释为命令的选项,通过以下的方式就可以复制、移动、删除带-或者--的文件,:1、首先,创建..
分类:
移动开发 时间:
2015-01-09 19:32:05
阅读次数:
123
一般情况下,元素拥有默认的white-space:normal(自动换行,PS:不 换行是white-space:nowrap),当录入的文字超过定义的宽度后会自动换行,但当录入的数据是一堆没有空格的字符或字母或数字(常规数据应 该不会有吧,但有些测试人员是会这样子做的),超过容器宽度时就会把容器撑...
分类:
Web程序 时间:
2015-01-09 13:59:15
阅读次数:
201
一、常见的Java内存溢出有以下三种:
1.java.lang.OutOfMemoryError: Java heap space ----JVM Heap(堆)溢出
JVM在启动的时候会自动设置JVMHeap的值,其初始空间(即-Xms)是物理内存的1/64,最大空间(-Xmx)不可超过物理内存。
可以利用JVM提供的-Xmn-Xms -Xmx等选项可进行设置。Heap的大小是Youn...
分类:
编程语言 时间:
2015-01-09 09:15:43
阅读次数:
259
题目:Sort a linked list inO(nlogn) time using constant space complexity.代码:oj 测试通过Runtime:372 ms 1 # Definition for singly-linked list. 2 # class ListNo...
分类:
编程语言 时间:
2015-01-08 19:37:40
阅读次数:
195
Determine whether an integer is a palindrome. Do this without extra space.
class Solution
{
public:
bool isPalindrome(int x)
{
if(x < 0)
return false;
int org = ...
分类:
其他好文 时间:
2015-01-08 18:12:09
阅读次数:
124