<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Remove Duplicates</title>
	<atom:link href="http://www.technicalinterviews.net/remove-duplicates/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.technicalinterviews.net/remove-duplicates/</link>
	<description>This site features a collection of common technical interview questions gathered by a group of programmers who have been through, and given, lots of technical interviews. There is an emphasis on C++ and game programming technical interviews, but most of the questions are relevant to any technical interview.</description>
	<lastBuildDate>Fri, 07 Oct 2011 20:18:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: ilya</title>
		<link>http://www.technicalinterviews.net/remove-duplicates/comment-page-1/#comment-4506</link>
		<dc:creator>ilya</dc:creator>
		<pubDate>Wed, 02 Mar 2011 20:59:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.technicalinterviews.net/remove-duplicates/#comment-4506</guid>
		<description>if this is a *sorted* array then if there are any duplicates they should immediately follow the &quot;original&quot; entry, ie:

0,1,3,5,6,[6],9,10,14,[14],[14], etc.

if (pArray[idx] == pArray[idx-1])
  delete(pArray[idx]);</description>
		<content:encoded><![CDATA[<p>if this is a *sorted* array then if there are any duplicates they should immediately follow the &#8220;original&#8221; entry, ie:</p>
<p>0,1,3,5,6,[6],9,10,14,[14],[14], etc.</p>
<p>if (pArray[idx] == pArray[idx-1])<br />
  delete(pArray[idx]);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.technicalinterviews.net/remove-duplicates/comment-page-1/#comment-1511</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Mon, 17 Sep 2007 22:15:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.technicalinterviews.net/remove-duplicates/#comment-1511</guid>
		<description>
int Reduce(int * pArray, int len)
{
	// make sure we got a valid pointer
	if (!pArray) return 0;

	// make sure we have an array &gt;= 2 in length, otherwise the array is &quot;unique&quot; by definition
	if (len </description>
		<content:encoded><![CDATA[<p>int Reduce(int * pArray, int len)<br />
{<br />
	// make sure we got a valid pointer<br />
	if (!pArray) return 0;</p>
<p>	// make sure we have an array &gt;= 2 in length, otherwise the array is &#8220;unique&#8221; by definition<br />
	if (len</p>
]]></content:encoded>
	</item>
</channel>
</rss>

