1)一百个从1到100的数组中,混进了一个数(也是从1到100),求算法找出 重复的数,并给出最有效的O() complexity, both time complexity and space complexity。
test case:
input (101个数字):
out put: True
out put: False
1)一百个从1到100的数组中,混进了一个数(也是从1到100),求算法找出 重复的数,并给出最有效的O() complexity, both time complexity and space complexity。
test case:
input (101个数字):
• 兄贵,这次有失水准啊。先赞美了 -avw- ♀ (0 bytes) () 04/02/2023 postreply 08:22:33
• 为什么? 挺难又很好的题 -兄贵- ♂ (0 bytes) () 04/02/2023 postreply 09:46:58
• 简单搜索的东西 -tibuko- ♂ (0 bytes) () 04/02/2023 postreply 08:26:32
• 谢谢尝试,但是面试失败 -兄贵- ♂ (0 bytes) () 04/02/2023 postreply 09:48:14
• 第一题,你题目中没说是排好的,test的数字已经排好了,这到底咋回事? -avw- ♀ (0 bytes) () 04/02/2023 postreply 08:38:31
• 谢谢,不必排好,我偷懒举了排好的例子 -兄贵- ♂ (0 bytes) () 04/02/2023 postreply 09:44:17
• 答案呢? -zhucekunnan- ♀ (0 bytes) () 04/02/2023 postreply 10:41:51