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
An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above
How do you view the path?
What is the difference between mpi and openmp?
What is realloc in c?
Explain #pragma statements.
How to explain the final year project as a fresher please answer with sample project
how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.
What is the difference between array and structure in c?
What do you know about the use of bit field?
How can I automatically locate a programs configuration files in the same directory as the executable?
Discuss the function of conditional operator, size of operator and comma operator with examples.
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
What is call by reference in functions?
What is data types?
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?