|
|
back to boardShow all messages Hide all messagesmy program O(N*N) java solution :( I think you solution is really O(N^3), because comparing strings takes O(N) time, not O(1), and true O(N^2) is extremely unlikely to get TL. Edited by author 15.10.2008 20:54 is true, my solution is O(N^3) :( slow The problems has good DP structure: array of sentres of possible first pallindrom, each such center is renewed for O(1) when i:=i+1 |
|
|