×

Loading...

两重循环内的hashTable.get(diff)的worst case是O(n)。如果换成TreeMap,那就是O(log(n)),那也只能做到(n^2)Log(n)。

iamflying (自食其水果)
(#9938487@0)
2016-2-10 -05:00
Reply
Page address has been copied.
To share, click to copy page address.
Share Online by QR Code

Back To Topic: 一道面试题,大家给出出主意哈,我一点头绪都没有

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习学科技术