Find the largest palindrome made from the product of two n-digit numbers. Since the result could be very large, you should return the largest palindro ...
分类:
其他好文 时间:
2018-03-18 21:41:39
阅读次数:
101
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a canal: Pan ...
分类:
其他好文 时间:
2018-03-13 10:22:02
阅读次数:
119
题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2744 题目描述: A regular palindrome is a string of numbers or letters that is the same ...
分类:
其他好文 时间:
2018-03-11 14:36:26
阅读次数:
168
问题链接 "LeetCode 9. Palindrome Number" 题目解析 判断一个数字是否是回文数字。 解题思路 题目已经给出很多提示和注意事项,还要求不能使用额外空间,其实就是想说请直接在数字上操作,不能转换成字符串。另外题目说明直接反转数字会超出范围,其实用long long表示反转结 ...
分类:
其他好文 时间:
2018-03-11 14:25:10
阅读次数:
112
There are 1000 buckets, one and only one of them contains poison, the rest are filled with water. They all look the same. If a pig drinks that poison ...
分类:
其他好文 时间:
2018-03-11 14:15:55
阅读次数:
151
[抄题]: 设计一种方式检查一个链表是否为回文链表。1->2->1 就是一个回文链表。 [暴力解法]: 时间分析: 空间分析: [思维问题]: [一句话思路]: [输入量]:空: 正常情况:特大:特小:程序里处理到的特殊情况:异常情况(不合法不合理的输入): [画图]: [一刷]: [二刷]: [三 ...
分类:
其他好文 时间:
2018-03-10 20:27:56
阅读次数:
232
原文链接: "https://leetcode.com/problems/palindrome number/description/" 。这道题目难度是简单,然后解答也是简单易懂,虽然我还是没能写出正确答案。。。 我的思路 首先,我想到的是将整数转换为一个字符数组,然后再比对对应位置上的字符是否相 ...
分类:
其他好文 时间:
2018-02-26 23:13:56
阅读次数:
239
【CF932G】Palindrome Partition 题意:给你一个字符串s,问你有多少种方式,可以将s分割成k个子串,设k个子串是$x_1x_2...x_k$,满足$x_1=x_k,x_2=x_{k-1}...x_i=x{k-i+1}$。 $|s|\le 10^6$ 题解:设字符串的长度为n, ...
分类:
其他好文 时间:
2018-02-25 13:19:22
阅读次数:
356
A - Palindromic Supersequence B - Recursive Queries C - Permutation Cycle D - Tree E - Team Work F - Escape Through Leaf G - Palindrome Partition ...
分类:
其他好文 时间:
2018-02-24 14:57:45
阅读次数:
202
(1) 先找中点(2) 再reverse后半段(3) 不用管两个子linked list的长度是否相等,从各个子链表的头开始一个一个比较。值不相等就返回false,相等就继续移动。 ...
分类:
其他好文 时间:
2018-02-24 10:44:40
阅读次数:
155