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