【题目】
Given a sorted linked list, delete all duplicates such that each element appear only once.
For example,
Given 1->1->2, return 1->2.
Given 1->1->2->3->3, return 1->2->3.
【题意】
给定一个已排序的链表,删除其中的重复元素
【思路】
维护两个指针prev和cur, cur指针负责扫描链表,prev指向cur的前一...
分类:
其他好文 时间:
2014-06-03 04:05:39
阅读次数:
231
Finding Nemo
Time Limit: 2000MS
Memory Limit: 30000K
Total Submissions: 7373
Accepted: 1715
Description
Nemo is a naughty boy. One day he went into the deep sea all b...
分类:
其他好文 时间:
2014-06-03 03:04:50
阅读次数:
348
已知一副RGB图像中的的像素值,利用matlab将其分割出来并以二进制图像形式显示:
%extract.m
clear all;
I=imread('new_original.png');
figure,imshow(I),title('Original Image');
bw=im2bw(I,0.3);
%figure,imshow(bw),title('Gray Image');
rgb=[...
分类:
其他好文 时间:
2014-06-03 02:46:26
阅读次数:
989
【题目】
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.
You should preserve the original relative order of the nodes in each of the two partitions.
For example,
Given 1->4->3-...
分类:
其他好文 时间:
2014-06-03 00:02:29
阅读次数:
270
1、错误描述
freemarker.core.ParseException: Encountered "string" at line 21, column 21 in type.ftl.
Was expecting one of:
"}" ...
"." ...
"[" ...
"(" ...
"?" ...
"!" ...
......
分类:
其他好文 时间:
2014-06-02 23:10:09
阅读次数:
327
【题目】
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.
【题意】
给定一个由0和1填充的二维矩阵,找一个全是1的最大矩形
【思路】
扫描二维矩阵,凡是扫到值为1的块时候,以当前块为矩形的左上角区块拓展,找最大矩阵。
先找出以每个“1”区块为左上角区块的最大矩形,然后求出最大全局的最大矩...
分类:
其他好文 时间:
2014-06-02 23:08:07
阅读次数:
289
ARMv8 Linux内核源码分析:__flush_dcache_all()...
分类:
系统相关 时间:
2014-06-02 23:06:58
阅读次数:
420
上一篇给大家讲到了cisco交换机的基本操作命令,趁端午节放假前,把cisco交换机的简单配置分享一下并预祝一下各位“端午节快乐”!Ok,要进行交换机的配置,首先就得进入交换机的全局配置模式,在成功连接交换机并且登陆成功进入特权模式下
1、输入进入全局配置模式:
switch#configure terminal
Enter configuration commands, one per l...
分类:
其他好文 时间:
2014-06-02 22:39:38
阅读次数:
336
【题目】
The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in the code, print the sequence of gray code. A gray code sequence must begin with 0.
...
分类:
其他好文 时间:
2014-06-01 09:16:29
阅读次数:
242
title:
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
Find the sum of all the primes below two million.
翻译:
10以下的质数的和为2 + 3 + 5 + 7 = 17。
请求出200,0000以下所有质数的和。
import math,time
d...
分类:
其他好文 时间:
2014-06-01 09:12:31
阅读次数:
239