This website requires Javascript to function properly. Please go to the setting of your web browser and enable Javascript for this website.
×
Loading...
Close
Home
Share
他的算法大致是O(n^4),和hash function没关系。buildHashTable()生成的hash table的尺寸已经是n^2了,analyze() loop里又每次遍历n个数和可能n^2个pair。
geekcode
(文心雕码)
虽然两个n^2不会同时出现,但是算法复杂度的量级不会减低。
(#9938565@0)
Last Updated: 2016-2-11
This post has been archived. It cannot be replied.
Share
Report
Replies, comments and Discussions:
一道面试题,大家给出出主意哈,我一点头绪都没有
枫下论坛主坛
/
工作学习
/
学科技术