码迷,mamicode.com
首页 >  
搜索关键字:palindrome    ( 1561个结果
[POJ3974]Palindrome
题目链接:http://poj.org/problem?id=3974DescriptionAndy the smart computer science student was attending an algorithms class when the professor asked the s...
分类:其他好文   时间:2015-08-29 16:41:37    阅读次数:193
[LeetCode] 9 - Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.class Solution { public: bool isPalindrome(int x) { if (x...
分类:其他好文   时间:2015-08-28 12:52:10    阅读次数:158
lightOJ 1205(Palindromic Numbers数位DP)
Palindromic Numbers Time Limit: 2000MS Memory Limit: 32768KB 64bit IO Format: %lld & %lluSubmit StatusDescriptionA palindromic number or numeral palindrome is a ‘symmetrical’ number like 16...
分类:其他好文   时间:2015-08-28 11:08:14    阅读次数:212
POJ 1159 Palindrome
PalindromeTime Limit:3000MSMemory Limit:65536KTotal Submissions:56756Accepted:19631DescriptionA palindrome is a symmetrical string, that is, a string ...
分类:其他好文   时间:2015-08-27 14:55:04    阅读次数:176
*[未完待续]Palindrome Linked List
题目:Given a singly linked list, determine if it is a palindrome. Follow up: Could you do it in O(n) time and O(1) space?碉堡!reference:http://www.cnblogs...
分类:其他好文   时间:2015-08-27 14:47:02    阅读次数:149
POJ 3280 Cheapest Palindrome
POJ 3280 Cheapest Palindrome字串S长M,由N个小写字母构成。欲通过增删字母将其变为回文串,增删特定字母花费不同,求最小花费。思路:1.先对普遍情况进行讨论 ,即不管内部是否回文的花费 :dp[i][j]=min(dp[i+1][j]+cost[s[i]-'a'],dp[i...
分类:其他好文   时间:2015-08-26 20:07:41    阅读次数:161
Palindrome Linked List
判断单链表是否为回文;思想:利用来两个指针找到链表中点,将后半个链表反转。然后判断。有个问题,下面的代码没有恢复原来的单链表。 1 class Solution { 2 public: 3 bool isPalindrome(ListNode* head) { 4 ListN...
分类:其他好文   时间:2015-08-25 23:06:44    阅读次数:180
POJ 1159 Palindrome(DP LCS)
Description A palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are to write a program which, given a string, determines the...
分类:其他好文   时间:2015-08-25 12:02:34    阅读次数:230
[LeetCode] Palindrome Permutation
Just check there are no more than 2 characters that appear an odd number of times in the string.My C++ code using an array as a hash map is as follows...
分类:其他好文   时间:2015-08-21 19:21:54    阅读次数:439
hdoj 1513 Palindrome
Palindrome Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4194    Accepted Submission(s): 1427 Problem Description A palindrome is...
分类:其他好文   时间:2015-08-21 13:43:45    阅读次数:178
1561条   上一页 1 ... 83 84 85 86 87 ... 157 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!