Palindrome Linked List问题:Given a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n) time and O(1) space?思路: 先选择中间的....
分类:
其他好文 时间:
2015-07-19 13:15:11
阅读次数:
96
有时间我会翻译成中文的Java swing applications' menus do not integrate with Ubuntu's global menu until Ubuntu 15.04. A library calledJayatanais available to enabl...
分类:
编程语言 时间:
2015-07-18 21:12:04
阅读次数:
1174
源码如下:#include
#include
#include
#include
#include
char *net_detect(char* net_name)
{
int skfd = 0;
struct ifreq ifr;...
分类:
系统相关 时间:
2015-07-18 18:40:52
阅读次数:
321
题目:
Follow up for "Search in Rotated Sorted Array":
What if duplicates are allowed?
Would this affect the run-time complexity? How and why?
Write a function to determine if a given target ...
分类:
编程语言 时间:
2015-07-18 17:11:34
阅读次数:
133
题目Given a singly linked list, determine if it is a palindrome.Follow up:
Could you do it in O(n) time and O(1) space?思路利用双指针法找到链表中点位置,链表中点以后的的元素(不包括中点元素)翻转,再跟链表中点位置以前的元素一一匹配。代码/*----------------------...
分类:
其他好文 时间:
2015-07-18 17:05:25
阅读次数:
91
题目:
Follow up for "Remove Duplicates":
What if duplicates are allowed at most twice?
For example,
Given sorted array nums = [1,1,1,2,2,3],
Your function should return length = 5, with the...
分类:
编程语言 时间:
2015-07-18 15:40:45
阅读次数:
157
1.信号( 这两个过程之间的同步)struct semaphore power_sem;sema_init(&pdata->power_sem,1);down(&pdata->power_sem);up(&pdata->power_sem);2.相互排斥量struct mutex led_mutex...
分类:
系统相关 时间:
2015-07-18 15:29:46
阅读次数:
145
Ohana Cleans UpDescriptionOhana Matsumae is trying to clean a room, which is divided up into annbyngrid of squares. Each square is initially either cl...
分类:
其他好文 时间:
2015-07-18 10:53:19
阅读次数:
88
Rabbit Tom and rabbit Jerry are running in a field. The field is an N×N grid. Tom starts from the up-left cell and Jerry starts from the down-right ce...
分类:
其他好文 时间:
2015-07-17 22:38:54
阅读次数:
187
当 svn 提示clean up时,而clean up 仍然没用的情况下先下载 sqlite3.exe然后 在svn目录下,.svn 隐藏文件夹中 有个 wc.db 的文件, 执行下面命令行sqlite3.exe.svn/wc.db"select*fromwork_queue"查看 这个 db 文件...
分类:
其他好文 时间:
2015-07-17 22:38:23
阅读次数:
234