Re: puzzle



Darius wrote:
ok here is a puzzle.
there is an integer array whose length is odd, and all the numbers in
the array appear exactly two times except one. Find the number in O(n)
time. Try to do it without using any other data structure.


hint: xor .



Relevant Pages

  • puzzle
    ... ok here is a puzzle. ... there is an integer array whose length is odd, ... Prev by Date: ...
    (comp.programming)
  • puzzle
    ... ok here is a puzzle. ... there is an integer array whose length is odd, ... Prev by Date: ...
    (comp.lang.c)
  • Re: Do loop -- replace with array ops?
    ... we have the integer array subtemp ... subtemp contains data from a particular file, ... and having read it in we want to put it into the data structure properly ... (error handling thing) ...
    (comp.lang.fortran)
  • Re: Do loop -- replace with array ops?
    ... we have the integer array subtemp ... subtemp contains data from a particular file, and having read it in we want to put it into the data structure properly. ...
    (comp.lang.fortran)
  • Re: Do loop -- replace with array ops?
    ... PhilB wrote: ... we have the integer array subtemp ... subtemp contains data from a particular file, and having read it in we want to put it into the data structure properly. ...
    (comp.lang.fortran)