阅读背景:

给定一个N个整数的数组,Python返回在O(N)时间复杂度中不出现的最小正整数(大于0)

来源:互联网 

I have written two solutions to that problem. The first one is good but I don't want to use any external libraries + its O(n)*log(n) complexity. The second solution "In which I need your help to optimize it" gives an error when the input is chaotic sequences length=10005 (with minus).I have written two solutions to that problem. T




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: