|
|
back to boardO(N^2) idea, works fine 4686044 16:50:13 21 Dec 2012 Marian Darius 1297. Palindrome C++ Accepted 0.031 108 KB Just try iterating the middle of the palindrome and extend to both ends, until you find two elements that are different. Re: O(N^2) idea, works fine Seriously? Are you really think that you are the first who do it for O(N^2) with the same idea? And it's not the first topic in the forum about this algo. Re: O(N^2) idea, works fine I don't know why but I get a TLE in #15 with the same approach as yours. |
|
|