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
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above
What is a program flowchart and how does it help in writing a program?
What should malloc(0) do?
In c language can we compile a program without main() function?
please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What is meant by type specifiers?
to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?
What are the two forms of #include directive?
What are pointers? What are stacks and queues?
cavium networks written test pattern ..
What does 3 periods mean in texting?
regarding pointers concept
How was c created?
How can I change the size of the dynamically allocated array?