1. 快速排序算法1.1 算法步骤:1> 从数列中挑出一个元素,称为“基准”(pivot),2> 重新排序数列,所有元素比基准值小的摆放在基准前面,所有元素比基准值大的摆在基准的后面(相同的数可以到任一边)。在这个分区退出之后,该基准就处于数列的中间位置。这个称为分区(partition)操作。3>...
分类:
编程语言 时间:
2015-05-10 11:23:41
阅读次数:
118
分区的信息是记录在information_schema.partitions 这个表里的。它不能直接定位行所在的分区,但它可查到每个分区中有多少行。例子:select partition_name as part,partition_expression as expr,partition_desc...
分类:
数据库 时间:
2015-05-10 00:57:15
阅读次数:
152
(没有坑怎么填?)最近膜了一些关于回文串的题目,感到非常有意思,遂开篇记录.在逛UOJ的题目时发现了vfk添上了新题,APIO 2014的题目.本身是一件很正常的事,而它事实上也没有变成什么了不得的事.我看到了Palindrome这个标题---回文串已经烂大街了,没什么新意.不过我很早就向学习回文树...
分类:
其他好文 时间:
2015-05-10 00:54:01
阅读次数:
147
Determine whether an integer is a palindrome. Do this without extra space.思想: 先计算出这个整数的逆序数,然后比较它和原来的数每位是否都相同即可。另外要注意负数没有回文数,还应该考虑overflow一定不是回文数。AC代码:...
分类:
其他好文 时间:
2015-05-09 18:58:58
阅读次数:
121
--查询一张表的分区select $partition.Part_func_UserLog(createdDate) as Patition from dbo.UserLog GROUP BY $partition.Part_func_UserLog(createdDate) --创建分区的时间段C...
分类:
数据库 时间:
2015-05-09 16:13:11
阅读次数:
216
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (i...
分类:
其他好文 时间:
2015-05-09 07:42:26
阅读次数:
124
Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi...
分类:
其他好文 时间:
2015-05-08 19:53:40
阅读次数:
112
对生产库的大表进行分区操作和维护,为了保证在线操作的顺利和安全进行,谨慎起见,在对生产库操作和维护前,针对oracle partition操作进行了多方面的测试,并进行了总结,记录与此,以便今后其他同学和自己参考。...
分类:
数据库 时间:
2015-05-07 18:55:13
阅读次数:
288
题意:
给出增加或减少某个字符的代价。
给你一个串,求让它变成回文串的最小代价。
思路:
和求次数一样。
然后注意的是其实增加和减少的性质是一样的。所以对于每个字符,取修改代价最小的就行了。
意思就是取增加和减少的最小值。
其他就同求次数的区间dp了。
代码:
#include"cstdlib"
#include"cstdio"
#include"cstring"
#includ...
分类:
其他好文 时间:
2015-05-07 16:55:12
阅读次数:
89
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
For example,
"A man, a plan, a canal: Panama" is a palindrome.
"race a car" is not a ...
分类:
其他好文 时间:
2015-05-07 16:48:34
阅读次数:
78