There is a array of 99 cells and we have to enter 1-100
elements in it , no two elements would repeat , so the is one
no. missing because 99 cells and 1-100 nos. so we had to
implement a function to find that missing no.
Answers were Sorted based on User's Feedback
Answer / amty
Get the sum of numbers
total = n*(n+1)/2
Subtract all the numbers from sum and
you will get the missing number.
| Is This Answer Correct ? | 41 Yes | 2 No |
Answer / shiva sahu
Get the sum of numbers
total = n*(n+1)/2
Subtract all the numbers from sum and
you will get the missing number.
this is not mine,but this ans is right
| Is This Answer Correct ? | 22 Yes | 0 No |
Should the this pointer can be used in the constructor?
What is the history of c++?
What is "mutable" keyword?
What is stoi in c++?
Can a Structure contain a Pointer to itself?
Describe linked list using C++ with an example.
What is the maximum combined length of command line arguments including the space between adjacent arguments?
why c++ is not called strictly d super set of c?
Define what is constructor?
What about Virtual Destructor?
What is a concrete class?
Why cstdlib is used in c++?