|
|
 | | From: | puzzlecracker | | Subject: | Riddle | | Date: | 19 Jan 2005 17:45:17 -0800 |
|
|
 | 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?
|
|
 | | From: | Alf P. Steinbach | | Subject: | Re: Riddle | | Date: | Thu, 20 Jan 2005 02:09:35 GMT |
|
|
 | * puzzlecracker: > 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?
DO NOT MULTIPOST.
My response to your identical posting in [comp.lang.c++] is cross-posted to this group, with follow-up here.
The title of that is "array Puzzle".
-- A: Because it messes up the order in which people normally read text. Q: Why is it such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
|
|
 | | From: | CBFalconer | | Subject: | Re: Riddle | | Date: | Thu, 20 Jan 2005 05:17:16 GMT |
|
|
 | "Alf P. Steinbach" wrote: > * puzzlecracker: > >> 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? > > DO NOT MULTIPOST. > > My response to your identical posting in [comp.lang.c++] is cross-posted > to this group, with follow-up here.
He is looking for ways to annoy. He has been refusing to quote properly, using the broken google reply mechanism after being shown how to avoid it, starting new threads on the same subject, etc. He also posted this thing to c.l.c, besides comp.programming where I am now.
-- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson
|
|
|