<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/12/5f70e25ab8bd63188579edc825ec4041"
  from="Alan Post &lt;apost@r...&gt;"
  author="Alan Post"
  date="2003-12-06T05:08:08"
  subject="[Caml-list] Re: how to calculate a &quot;xor&quot;"
  prev="2003/12/a57122d122354488c33fdd71c79eb0e0"
  next="2003/12/c26f3a953606811699bfc588b23b35f3"
  prev-in-thread="2003/12/15aed9cdaa87e3077ca1de4ee1e768ca"
  next-in-thread="2003/12/644d57efdd9d2acc90b0e089df817412"
  prev-thread="2003/12/89c86bc0dc75f477b32fd1c1d1f8d712"
  next-thread="2003/12/6645b76fdaaac896907eba3358f17de9"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] how to calculate a &quot;xor&quot;">
<msg 
  url="2003/12/15aed9cdaa87e3077ca1de4ee1e768ca"
  from="Damien &lt;Damien.Pous@e...&gt;"
  author="Damien"
  date="2003-12-05T19:11:04"
  subject="[Caml-list] how to calculate a &quot;xor&quot;">
<msg 
  url="2003/12/5f70e25ab8bd63188579edc825ec4041"
  from="Alan Post &lt;apost@r...&gt;"
  author="Alan Post"
  date="2003-12-06T05:08:08"
  subject="[Caml-list] Re: how to calculate a &quot;xor&quot;">
</msg>
<msg 
  url="2003/12/644d57efdd9d2acc90b0e089df817412"
  from="Jean-Baptiste Rouquier &lt;jean-baptiste.rouquier@e...&gt;"
  author="Jean-Baptiste Rouquier"
  date="2003-12-10T21:47:02"
  subject="Re: [Caml-list] how to calculate a &quot;xor&quot;">
</msg>
</msg>
</thread>

<contents>
In article &lt;20031205200829.7e29a2c6.Damien.Pous@ens-lyon.fr&gt;, Damien wrote:
&gt; 
&gt; Given two sets A and B, I want to calculate A\B _and_ B\A.  The sets
&gt; are represented by lists.
&gt; 
&gt; without using an order to sort the lists, is there something better
&gt; than the following (O(n^2)) ?

If you have a decent hashing function, you can get expected linear
time by putting the elements into hash tables.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

