|
|
вернуться в форумПоказать все сообщения Спрятать все сообщения> The Time complexity is o(n^2),is it fast enough? >>The Time complexity is o(n^2),is it fast enough? I think yes, but there is a rather simple solution with the complexity of O(n). It's really simple, just do some thinking :o) Besides, I think I can't explain the idea in English... :( Yes...You can use DP to solve.but not DFS or other searching method.. |
|
|