<?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: The Amazon.com Interview</title>
	<atom:link href="http://elliottback.com/wp/the-amazoncom-interview/feed/" rel="self" type="application/rss+xml" />
	<link>http://elliottback.com/wp/the-amazoncom-interview/</link>
	<description>Internet &#38; Technology</description>
	<lastBuildDate>Sun, 22 Nov 2009 02:40:56 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: kamaraj</title>
		<link>http://elliottback.com/wp/the-amazoncom-interview/#comment-2188222</link>
		<dc:creator>kamaraj</dc:creator>
		<pubDate>Wed, 05 Aug 2009 14:34:01 +0000</pubDate>
		<guid isPermaLink="false">/?p=867#comment-2188222</guid>
		<description>Thanks Elliott. Great Code. Here i give the entire java code.

&lt;pre class=&quot;brush:java&quot;&gt;
class A
{
	public static void main(String args[])
	{
		int [] inArr = {20,8,35,87,82,32,98,32,31,54,32,123,35,1,2,3,2313,5534,1231,123,53,23};
		inArr = sortArray(inArr);
		for(int i =0 ;i &lt; inArr.length; i++)
			System.out.println (inArr[i]);
		System.out.println (inArr(inArr,2333));
	}
	
 	public static int [] sortArray(int [] arr)
	{
		int temp;
		for(int i=0; i&lt;arr.length;i++)
			for(int j=i; j arr[j])
				{
					temp = arr[i];
					arr[i] = arr[j];
					arr[j] = temp;
				}
				return arr;
	}


	public static boolean inArr(int [] arr, int sought) {
	  int left = 0;
	  int right = arr.length - 1;

	  while(left  0) {
	      right--;
	    } else if(test &lt; 0) {
	      left++;
	    } else {
	      return true;
	    }
	  }
	  return false;
	}
}&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Thanks Elliott. Great Code. Here i give the entire java code.</p>
<pre class="brush:java">
class A
{
	public static void main(String args[])
	{
		int [] inArr = {20,8,35,87,82,32,98,32,31,54,32,123,35,1,2,3,2313,5534,1231,123,53,23};
		inArr = sortArray(inArr);
		for(int i =0 ;i &lt; inArr.length; i++)
			System.out.println (inArr[i]);
		System.out.println (inArr(inArr,2333));
	}

 	public static int [] sortArray(int [] arr)
	{
		int temp;
		for(int i=0; i&lt;arr.length;i++)
			for(int j=i; j arr[j])
				{
					temp = arr[i];
					arr[i] = arr[j];
					arr[j] = temp;
				}
				return arr;
	}

	public static boolean inArr(int [] arr, int sought) {
	  int left = 0;
	  int right = arr.length - 1;

	  while(left  0) {
	      right--;
	    } else if(test &lt; 0) {
	      left++;
	    } else {
	      return true;
	    }
	  }
	  return false;
	}
}</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: acoader</title>
		<link>http://elliottback.com/wp/the-amazoncom-interview/#comment-2126830</link>
		<dc:creator>acoader</dc:creator>
		<pubDate>Sun, 05 Oct 2008 18:39:11 +0000</pubDate>
		<guid isPermaLink="false">/?p=867#comment-2126830</guid>
		<description>Great solution of using 2 pointers by Elliot. Its highly intuitive. I had reached the part where you have two pointers, but did not get the part where you increment only either the left or the right pointer ...!</description>
		<content:encoded><![CDATA[<p>Great solution of using 2 pointers by Elliot. Its highly intuitive. I had reached the part where you have two pointers, but did not get the part where you increment only either the left or the right pointer &#8230;!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tom</title>
		<link>http://elliottback.com/wp/the-amazoncom-interview/#comment-2125413</link>
		<dc:creator>tom</dc:creator>
		<pubDate>Sun, 05 Oct 2008 05:20:05 +0000</pubDate>
		<guid isPermaLink="false">/?p=867#comment-2125413</guid>
		<description>Hey Sridhar,

What was the complexity of your solution?</description>
		<content:encoded><![CDATA[<p>Hey Sridhar,</p>
<p>What was the complexity of your solution?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raj</title>
		<link>http://elliottback.com/wp/the-amazoncom-interview/#comment-1961017</link>
		<dc:creator>Raj</dc:creator>
		<pubDate>Mon, 11 Aug 2008 04:42:17 +0000</pubDate>
		<guid isPermaLink="false">/?p=867#comment-1961017</guid>
		<description>Hi,

 I am soon to have my first phone interview with Amazon for a SDE position and I have 4 years of Software Development Experience. Are the questions(telephone and in-person) the same for an experienced developer like me and a fresh out of college grad ?

Thanks
Raj</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p> I am soon to have my first phone interview with Amazon for a SDE position and I have 4 years of Software Development Experience. Are the questions(telephone and in-person) the same for an experienced developer like me and a fresh out of college grad ?</p>
<p>Thanks<br />
Raj</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mohit</title>
		<link>http://elliottback.com/wp/the-amazoncom-interview/#comment-1517000</link>
		<dc:creator>Mohit</dc:creator>
		<pubDate>Fri, 25 Apr 2008 23:31:47 +0000</pubDate>
		<guid isPermaLink="false">/?p=867#comment-1517000</guid>
		<description>I was asked the same question. 
What i replied was this:
Go to each element store the (key,value) as (number, its hash).
For each element also check if key =(sum-element) is in the hash or not. 
Thus it takes only o(n) and one iteration only. And I passed the interview so i suppose i was correct.</description>
		<content:encoded><![CDATA[<p>I was asked the same question.<br />
What i replied was this:<br />
Go to each element store the (key,value) as (number, its hash).<br />
For each element also check if key =(sum-element) is in the hash or not.<br />
Thus it takes only o(n) and one iteration only. And I passed the interview so i suppose i was correct.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
