Hi,
A* sorted *integer array contains elements in pairs. All the pairs are
complete except one element whose pair is missing. Find that element.
Ex. { 1,1,2,2,2,2,3,3,4,5,5}
result = 5
There is a standard solution which returns an XOR of all the elements. But
this needs O(n) time complexity.
this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Atul Purohit
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email
to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Atul Purohit
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks
@puuneet
http://en.wikipedia.org/wiki/Sorting_algorithm#Stability
On Fri, Jul 22, 2011 at 10:57 AM, Puneet Gautam puneet.nsi...@gmail.comwrote:
What is meant by maintaining the stability...?
pls tell me...!!
Thanks.
On 7/22/11, atul purohit gonewiththe...@gmail.com wrote:
here in O(n
...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Atul Purohit
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com
...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Atul Purohit
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com
this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Atul Purohit
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email
at
http://groups.google.com/group/algogeeks?hl=en.
--
Atul Purohit
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks
email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Atul Purohit
--
You received this message because you are subscribed
Hi,
Can someone explain me how to do this.
Given a file containing roughly 300 million 9-digit numbers. Find a 9-digit
number that isn't present in the file.You have unlimited drive space but
only 2MB of RAM available.
I suppose we have to use bit-vectors n all but still couldnt figure out a
all this
blocks for the number.
On Thu, Jun 23, 2011 at 9:59 AM, atul purohit gonewiththe...@gmail.com
wrote:
Hi,
Can someone explain me how to do this.
Given a file containing roughly 300 million 9-digit numbers. Find a
9-digit
number that isn't present in the file.You have
for the number untill you reach the end of
file is O(n).
On Thu, Jun 23, 2011 at 12:17 PM, atul purohit gonewiththe...@gmail.com
wrote:
Hi,
While external sorting is a probable way to sort it. Still it changes the
content and time complexity will be O(n). It is a trivial job to copy
is in file A. Then we read
number from file A, proceed the above procedure, test with number n/4. The
procedure goes on until we find the missing. The method only works on there
is no duplicate in the numbers.
On Thu, Jun 23, 2011 at 11:17 AM, atul purohit
gonewiththe...@gmail.comwrote:
Hi
13 matches
Mail list logo