string compare in java
<p>I have a ArrayList, with elements something like:</p>

<pre><code>[string,has,was,hctam,gnirts,saw,match,sah]
</code></pre>

<p>I would like to delete the ones which are repeating itself, such as string and gnirts, and delete the other(gnirts). How do I go about achieving something as above?</p>

<p><strong>Edit</strong>: I would like to rephrase the question:</p>

<p>Given an arrayList of strings, how does one go about deleting elements containing reversed strings?
Given the following input:</p>

<pre><code>[string,has,was,hctam,gnirts,saw,match,sah]
</code></pre>

<p>How does one reach the following output:</p>

<pre><code>[string,has,was,match]
</code></pre>
