码迷,mamicode.com
首页 >  
搜索关键字:palindrome partition    ( 4210个结果
[leetcode]Shortest Palindrome
O(n^2)的方法,最后一个case超时。需要用kmp方法或者manacher方法才能O(n),先忽略了。 class Solution: def isPalindrome(self, sub: str) -> bool: for i in range(len(sub) // 2): if sub[ ...
分类:其他好文   时间:2020-02-07 18:29:59    阅读次数:48
Leetcode 9. Palindrome Number
Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Input: 121Output: true ...
分类:其他好文   时间:2020-02-06 20:03:07    阅读次数:83
LeetCode Solution-125
125. Valid Palindrome Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. Note : For the pur ...
分类:其他好文   时间:2020-02-05 23:49:36    阅读次数:129
oracle分析函数汇总
目录导航: "1. 分析函数语法" "2. count() over():统计分区中各组的行数,partition by 可选,order by 可选" "3. sum() over():统计分区中记录的总和,partition by 可选,order by 可选" "4. avg() over() ...
分类:数据库   时间:2020-02-05 18:31:22    阅读次数:128
spark学习四
5.sc.textFiles() 与 sc.wholeTextFiles() 的区别 sc.textFile()是将path 里的所有文件内容读出,以文件中的每一行作为一条记录的方式,文件的每一行 相当于 列表 的一个元素,因此可以在每个partition中用for i in data的形式遍历处理 ...
分类:其他好文   时间:2020-02-05 18:20:06    阅读次数:457
poj3974 Palindrome
题目连接 题意:求一个字符串的最长回文子串 题解:是一个Manacher模板题,为了统一奇偶,先预处理在字符间添加间隔,使字符串长度变为偶数,例如"abc"添加分隔符后变成"$#a#b#c#",剩下的就很简单了,这个题也可以用哈希做。就时间复杂度来看Manacher明显比哈希快。 Manacher代 ...
分类:其他好文   时间:2020-02-04 23:46:00    阅读次数:69
spark学习三
1.spark中partition的概念partition是RDD的最小单元,是盛放文件的盒子,一个文件可能需要多个partition,但是一个partition只能存放一个文件中的内容,partition是spark计算中,生成的数据在计算空间内最小单元,2.fileWriter.flush()f ...
分类:其他好文   时间:2020-02-04 20:10:54    阅读次数:81
2月4日
今天学习了操作系统的第三章,第四章,刷了剑指offer十道算法题。 完成了毕设的关于专辑介绍的自动分类的数据爬取(因为电脑换了,寒假爬取的数据全没了,需要重新爬取) 1.遇到的问题:orcle登录失效,并忘记了system密码: 启动sqlplus 请输入用户名: sqlplus/as sysdba ...
分类:其他好文   时间:2020-02-04 20:02:32    阅读次数:80
tsar采集nginx指标
tsar介绍 本文主要介绍如何利用tsar对线上linux服务器进行诊断,及其原理。 tsar是由淘宝核心系统部门研发并开源到github上,源码路径见 "alibaba/tsar" 。 为了支持rds运维,加入一些定制的功能,由于内核组以功能不普遍适用拒绝合并到主干,拉了一个分支到内网gitlb上 ...
分类:其他好文   时间:2020-02-04 15:37:17    阅读次数:74
680. Valid Palindrome II
Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Input: "aba" Output: True Exa ...
分类:其他好文   时间:2020-02-04 11:04:16    阅读次数:77
4210条   上一页 1 ... 31 32 33 34 35 ... 421 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!