Remove Nth Node From End of ListGiven a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2.....
分类:
其他好文 时间:
2014-07-22 22:53:35
阅读次数:
220
Swap Nodes in PairsGiven a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2-...
分类:
其他好文 时间:
2014-07-19 22:25:10
阅读次数:
210
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
简单的一个排序+贪心#include #include using namespace std;struct peo{ int x,y;};bool com(peo a,peo b){ return a.x>s>>n; for(int i=0;i>l[i].x>>l[i].y; ...
分类:
其他好文 时间:
2014-07-19 18:34:28
阅读次数:
207
Strictly speaking, a function can only return one value, but if the value is a tuple, the effect is the same as returning multiple values. For example...
分类:
其他好文 时间:
2014-07-19 18:31:23
阅读次数:
208
Linked List Cycle IIGiven a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without u...
分类:
其他好文 时间:
2014-07-19 18:18:51
阅读次数:
270
import hashlib;from Crypto.Cipher import DES3import base64def create_key(sk): r=hashlib.md5(sk).digest() return r+r[:8]def init_str(s): l=len(s) % 16 ...
分类:
编程语言 时间:
2014-07-19 16:07:32
阅读次数:
192
Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, giv...
分类:
其他好文 时间:
2014-07-19 14:20:14
阅读次数:
178
c汇编 例子程序如下:#include int main(){int arr[] = {6,7,8,9,10};int * ptr = arr;*(ptr++) += 123;printf("%d, %d\n",*ptr,*(++ptr));return 0;}一开始,指针ptr指向第一个元素6,....
分类:
其他好文 时间:
2014-07-19 14:16:26
阅读次数:
278
eclipse 3.4+jdk1.6编译正常通过,运行debug模式时报错ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2JDWP exit error AGENT_ERROR_NO_JNI_E...
分类:
其他好文 时间:
2014-07-19 13:30:48
阅读次数:
239