How can find the repitition of a number from a given array with
less time complexity(<N)?

Recommended Answers

All 2 Replies

If n is the size of the array you can't.

How can find the repitition of a number from a given array with
less time complexity(<N)?

You need to check through every element in the array to ensure that there is no repetition right ? So if the array was of size n, then to ensure that there is no repetition inside the array, you need to check every element, namely n elements.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.