9. Palindrome Number Easy Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example ...
分类:
其他好文 时间:
2019-09-15 01:20:34
阅读次数:
92
题意 找如下子串的个数: (l,r)是回文串,并且(l,(l+r)/2)也是回文串 思路 本来写了个回文树+dfs+hash,由于用了map所以T了 后来发现既然该子串和该子串的前半部分都是回文串,所以 该子串的前半部分和后半部分是本质相同的! 于是这个log就去掉了 代码 c++ include ...
分类:
其他好文 时间:
2019-09-13 15:57:38
阅读次数:
88
In this challenge, you will be given a palindrome which you must modify if possible. Change exactly one character of the string to another character i ...
分类:
其他好文 时间:
2019-09-12 09:33:11
阅读次数:
171
题面就不弄了 题意:给你一个串,让你求出补充最少的字符形成的回文串 思路:思路很好想,就是对一个串,找其最后一个字符(第一个也行)和原串的反串的最长公共前缀,这样就求出了该串中的已有最长回文,然后把剩下部分 倒序添加到原串上即可。 也就是我们可以固定一个位置,即使反串的第一个单词(原串最后一个),然 ...
分类:
编程语言 时间:
2019-09-07 22:30:12
阅读次数:
114
Question Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome par ...
分类:
其他好文 时间:
2019-09-07 00:49:44
阅读次数:
101
Palindrome Pairs warm up:is_palindrome 给定一个字符串数组,找出所有的字符串对,该字符串对拼接起来是回文字符串(https://leetcode.com/problems/palindrome-pairs/?tab=Description) Round numb ...
分类:
其他好文 时间:
2019-09-06 13:01:46
阅读次数:
258
题目描述 Determine whether an integer is a palindrome. An integer?is?a?palindrome when it?reads the same backward as forward. Example 1: Input: 121 Output ...
分类:
其他好文 时间:
2019-09-01 21:26:15
阅读次数:
100
5175. Can Make Palindrome from Substring My SubmissionsBack to Contest 5175. Can Make Palindrome from Substring My SubmissionsBack to Contest My Submi ...
分类:
其他好文 时间:
2019-09-01 16:56:59
阅读次数:
104
1 #define _for(i,a,b) for(int i = (a);i b;i --) 3 4 class Solution 5 { 6 public: 7 vector canMakePaliQueries(string s, vector>& queries) 8 { 9 vector ... ...
分类:
其他好文 时间:
2019-09-01 14:44:22
阅读次数:
164
Description: Given a string s, we make queries on substrings of s. For each query queries[i] = [left, right, k], we may rearrange the substring s[left ...
分类:
其他好文 时间:
2019-09-01 12:38:33
阅读次数:
104