您的位置:首页 > 其它

Finding a number that repeats even no of times where all the other numbers repeat odd no of times

2012-07-26 12:41 381 查看
看Careercup上一个美国女人问的 

阿三哥们讨论半天 还是没有时间O(n)和空间O(1)的解法

时间O(n)最好的方法就是哈希方法,最后判断奇偶时候用x^0x01判断

空间O(1)的方法就是快速排序了

看他们讨论了半天 真是欢快
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  numbers
相关文章推荐