请问 Scopus 现在还有试用吗?# Immigration - 落地生根v*F2014-01-09 08:011 楼Given a string, return true if it contains a palindrome of length greaterthan 1这到题的最优是什么? 请指教
kc2014-01-09 08:013 楼三个pointer,遍历一遍,idx3的值等于idx2,或者等于idx1的值,返回true?【在 v******F 的大作中提到】: Given a string, return true if it contains a palindrome of length greater: than 1: 这到题的最优是什么? 请指教
s*72014-01-09 08:0112 楼是很简单, 不过你这个还漏了检查相邻字符相等的情况 charAt(i-1)==charAt(i) ||charAt(i-1)==charAt(i+1) 一个循环即可【在 b********6 的大作中提到】: 这也叫题吗: for循环从1到length-2: charAt(i-1)==charAt(i 1): Return true;
b*62014-01-09 08:0113 楼确实。。这么简单的题都做错,看来offer是没了。。|【在 s******7 的大作中提到】: 是很简单, 不过你这个还漏了检查相邻字符相等的情况 charAt(i-1)==charAt(i) ||: charAt(i-1)==charAt(i+1) 一个循环即可
s*s2014-01-09 08:0114 楼how about this case?azbzcdefghijk感觉更像 leetcode #5 的变形。有超过一个的就return true.|【在 s******7 的大作中提到】: 是很简单, 不过你这个还漏了检查相邻字符相等的情况 charAt(i-1)==charAt(i) ||: charAt(i-1)==charAt(i+1) 一个循环即可
s*72014-01-09 08:0115 楼没问题呀, 走到zbz的b时候charAt(i - 1) == charAt(i + 1)就会return true;【在 s*********s 的大作中提到】: how about this case?: azbzcdefghijk: 感觉更像 leetcode #5 的变形。有超过一个的就return true.: : |