Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For exampl ...
分类:
其他好文 时间:
2017-10-03 00:52:13
阅读次数:
157
Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thi ...
分类:
其他好文 时间:
2017-10-02 23:10:18
阅读次数:
230
Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Example 2: Note: s ...
分类:
其他好文 时间:
2017-10-02 09:31:27
阅读次数:
163
Palindrome Number 问题描述如下: Determine whether an integer is a palindrome. Do this without extra space. 关键在不占用额外的空间的情况下生成它的回文序列,然后作差即可。 如果相等,说明回文,如果不相等说明 ...
分类:
其他好文 时间:
2017-09-29 00:12:20
阅读次数:
140
思路: 首尾指针一起走,如果遇到非0-9,a-z,A-Z直接跳过去 判定是否相等,直接减去65,也就是ascii码A对应的那个值,如果是非负数则判定为是字母,进行字母的处理,如果是负数,不进行处理,这个时候已经将其判定为是数字,以上操作将65作为坐标原点将数字(左边)和字母(右边)进行了切分。 本来 ...
分类:
其他好文 时间:
2017-09-27 00:45:50
阅读次数:
138
所谓回文字符串,就是一个字符串从左到右读和从右到左读是完全一样的。比如:"level" 、“aaabbaaa”、 "madam"、"radar"。 如何判断字符串是否是回文呢?解决思路如下: 1. 采取穷举法(Brute Force algorithm),枚举并检查(enumerate & chec ...
分类:
编程语言 时间:
2017-09-26 11:58:43
阅读次数:
293
https://leetcode.com/problems/largest-palindrome-product/description/ ...
分类:
其他好文 时间:
2017-09-25 19:53:18
阅读次数:
123
680. Valid Palindrome II【easy】 Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1 ...
分类:
其他好文 时间:
2017-09-23 18:51:12
阅读次数:
201
125. Valid Palindrome【easy】 Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example, ...
分类:
其他好文 时间:
2017-09-23 16:15:52
阅读次数:
137
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 ...
分类:
其他好文 时间:
2017-09-20 19:36:17
阅读次数:
167