Given an array of length N containing integers between 1
and N, determine if it contains any duplicates.
Answer Posted / ash
If the question is just to find just whether there are
duplicates in the array, we can just sum all the numbers
and if the sum is less than n(n+1)/2, some number in the
array has repeated.
Is This Answer Correct ? | 8 Yes | 39 No |
Post New Answer View All Answers
Where are c variables stored in memory?
What is function prototype in c language?
we called a function and passed something do it we have always passed the "values" of variables to the called function. such functions calles are called a) calls by reference b) calls by value c) calls by zero d) none of the above
How can I rethow can I return a sequence of random numbers which dont repeat at all?
What does emoji p mean?
What is a shell structure examples?
What is const and volatile in c?
What is hashing in c language?
What is indirection? How many levels of pointers can you have?
How to Throw some light on the splay trees?
What are 'near' and 'far' pointers?
An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above
What is calloc()?
How can I prevent another program from modifying part of a file that I am modifying?
What is meant by recursion?