1.栈和队列是两种特殊的线性表
运算操作被限定只能在表的一端或两端插入,删除元素,故也称它们为限定的线性表结构
2.栈的基本运算
1).Stackinit(&s) 构造一个空栈
2).Stackempty(s) 判断s是否为空栈,当s为空栈时,函数返回值1 否则 0
3).Push(&s,x) 在栈s 的顶部插入元素x,简称将x入 栈
4).Pop(&...
分类:
其他好文 时间:
2014-06-01 09:08:36
阅读次数:
278
【题目】
Given two sorted integer arrays A and B, merge B into A as one sorted array.
Note:
You may assume that A has enough space (size that is greater or equal to m + n) to hold additional elements from B. The number of elements initialized in A and B are...
分类:
其他好文 时间:
2014-06-01 09:21:16
阅读次数:
292
***************************************************************************************************************************
作者:EasyWave 时间:2014.05.31...
分类:
其他好文 时间:
2014-06-01 09:13:14
阅读次数:
258
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
题目链接:点击打开链接
寒假安排
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 128000/64000 KB (Java/Others)
SubmitStatistic Next
Problem
Problem Description
寒假又快要到了,不过对于lzx来说,头疼的事又来了,因为众多的后...
分类:
其他好文 时间:
2014-06-01 09:43:08
阅读次数:
209
***************************************************************************************************************************
作者:EasyWave 时间:2014.05.31...
分类:
其他好文 时间:
2014-06-01 09:07:52
阅读次数:
305
Apriori算法是数据挖掘中一种挖掘关联规则的频繁项集算法。其核心是基于两阶段频集思想的递推算法。
先来了解下关联规则挖掘:
发现事务数据库,关系数据, 或其它信息库中项或数据对象集合间的频繁模式。关联,相关,或因果关系结构。
频繁模式:在数据库中频繁出现的模式(项集, 序列, 等)。
动机是发现数据中的规律性。
如:
购物篮分析:哪些产品更经...
分类:
其他好文 时间:
2014-06-01 09:52:13
阅读次数:
245
【题目】
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
这几天一直在考虑机房收费系统学生下机操作。学生下机,一则需要添加学生下机记录信息;还需要计算学生在整个上机过程中所花费的金额,并且更新学生余额。那么如何做在性能上或者扩展上更好一些呢? 操作 1.添加学生下机信息 2.计算学生上机时间 3.根据上机时间来计算学生所花费的金额 4.更新学生的余额 设计模式 在...
分类:
其他好文 时间:
2014-06-01 09:36:37
阅读次数:
206
Sketch Nyquist plot
这是相当纠结的领悟。我始终没明白Nyquist曲线究竟是怎么回事,简直痛苦
之前讲了
波特图入门
徒手绘制波特图
波特图就是讲幅频特性和相频特性分别绘制在两幅图片上,而Nyquist曲线是将这两幅图合并成一幅图。
现实生活中多是黑箱模型,系统内部的结构是不知道的,为了...
分类:
其他好文 时间:
2014-06-01 09:07:11
阅读次数:
347
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is...
分类:
其他好文 时间:
2014-06-01 09:05:42
阅读次数:
271
Description
Some strange code is sent to Da Shan High School. It's said to be the prophet's note. The note is extremely hard to understand. However, Professor Meng is so smart that he successfully ...
分类:
其他好文 时间:
2014-06-01 09:18:38
阅读次数:
246
《大话设计模式》中讲状态模式这一节名字叫做“无尽加班何时休-状态模式”。菜鸟由于编程经验不足,解决问题的能力不够而不得不牺牲时间去不断的写代码结果还是反复出错。而大神每次都能深入到问题的根源运用自己的思想去写代码,每个问题都完美的解决。
加班的菜鸟一天各个时间段状态都不一样,从开始的精神百倍到越来越疲惫。自己写出的代码不断带来问题。
代码是程序员思维智慧的结晶,菜鸟...
分类:
其他好文 时间:
2014-06-01 10:08:30
阅读次数:
253
In the 2020 grid below, four numbers along a diagonal line have been marked in red.
08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08
49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 ...
分类:
其他好文 时间:
2014-06-01 10:04:38
阅读次数:
419
火星A+B
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 10288 Accepted Submission(s): 3409
Problem Description
读入两个不超过25位的火星正整数A和B...
分类:
其他好文 时间:
2014-06-01 10:33:27
阅读次数:
199
今天遇到一个问题,在终端里运行newLISP脚本,一切正常,移动到crontab中就不行。即便crontab -e命令运行在同一个用户下,还是有问题。由于newLISP脚本要用到hive和hadoop,估计是环境变量的问题。所以先用newLISP shell运行(env)命令,将当前环境变量记录到文件evn.lsp中。然后在newLISP脚本中加载之。下面是env.lsp文件部分内容:(set '...
分类:
其他好文 时间:
2014-06-01 10:26:57
阅读次数:
330
EMC World 2014的主题就是REDEFINE。的确,现在科技的发展在重新定义了技术,影响了生活,改变了你我。 我现在也需要Redefine。
对于一个有数万员工,甚至数十万员工的企业来说,Redefine无疑更加具有挑战,对于未来的把握,稍有不慎可能导致企业的命运无可挽回。就如许多局外人都在据理分析Nokia, Motorola应该要如何改变才能适应趋势,但是就如泰坦尼克,危险就发生在眼前,但是巨擘已经没有时间去调转。
员工的轨迹也一样,如果企业转型不成功,企业失败了,对于个人的影响也是巨大。毕...
分类:
其他好文 时间:
2014-06-01 10:32:43
阅读次数:
191