|
|
вернуться в форумHow do you solve this problem very fast , what's the time complexity. please give me some hint. here or piyawut@se-ed.net Re: How do you solve this problem very fast , what's the time complexity. please give me some hint. here or piyawut@se-ed.net Послано Jordan 21 фев 2002 10:33 > The Time complexity is o(n^2),is it fast enough? Re: How do you solve this problem very fast , what's the time complexity. please give me some hint. here or piyawut@se-ed.net >>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... :( Re: How do you solve this problem very fast , what's the time complexity. please give me some hint. here or piyawut@se-ed.net Yes...You can use DP to solve.but not DFS or other searching method.. |
|
|