"puzzlecracker" <ir*********@gmail.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Given an array of size n and populated with consecutive integers from 1
to n i.e. [1, 2...n-1, n] in random order. Two integers are removed,
meaning zero is placed in their places. Give O (n) efficient algorithm
to find them?
Seriously now, where are you getting all these odd questions? I cannot
believe you're making them up. Are they homework, some kind of home-study
course, or a list of possible interview questions?
In any case, how about you try to solve the problem yourself first, then
post with any issues you have with your solution? Why should we waste our
time? It's not like you're having a problem with the language that you need
help with. Especially in this case. Besides, this question is asking for
an algorithm, and has nothing to do with the C++ language. You could ask in
a more general newsgroup, I suppose. But still, I think someone looking to
hire a programmer would look for someone who could solve such things on
their own, don't you?
-Howard