有人用过好使的 shampoo and shower gel2合1吗?# Fashion - 美丽时尚
d*3
1 楼
Given an array of size n, the array contains numbers in range from 0 to k-1
where k is a positive integer and k <= n. Find the maximum repeating number
in this array. For example, let k be 10 the given array be arr[] = {1, 2, 2,
2, 0, 2, 0, 2, 3, 8, 0, 9, 2, 3}, the maximum repeating number would be 2.
Expected time complexity is O(n) and extra space allowed is O(1).
Modifications to array are allowed.
where k is a positive integer and k <= n. Find the maximum repeating number
in this array. For example, let k be 10 the given array be arr[] = {1, 2, 2,
2, 0, 2, 0, 2, 3, 8, 0, 9, 2, 3}, the maximum repeating number would be 2.
Expected time complexity is O(n) and extra space allowed is O(1).
Modifications to array are allowed.