<?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: What Technical Tests Do You Give Potential Hires?</title>
	<atom:link href="http://www.rickwargo.com/2008/05/02/what-technical-tests-do-you-give-potential-hires/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rickwargo.com/2008/05/02/what-technical-tests-do-you-give-potential-hires/</link>
	<description>Acquiring information, one day at a time.</description>
	<lastBuildDate>Fri, 30 Jul 2010 16:01:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Rick Wargo</title>
		<link>http://www.rickwargo.com/2008/05/02/what-technical-tests-do-you-give-potential-hires/comment-page-1/#comment-32811</link>
		<dc:creator>Rick Wargo</dc:creator>
		<pubDate>Mon, 14 Jun 2010 02:00:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.rickwargo.com/?p=132#comment-32811</guid>
		<description>@David, creativity is key...languages are generally easily learned-the concepts are important.</description>
		<content:encoded><![CDATA[<p>@David, creativity is key&#8230;languages are generally easily learned-the concepts are important.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David B</title>
		<link>http://www.rickwargo.com/2008/05/02/what-technical-tests-do-you-give-potential-hires/comment-page-1/#comment-32780</link>
		<dc:creator>David B</dc:creator>
		<pubDate>Fri, 11 Jun 2010 15:56:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.rickwargo.com/?p=132#comment-32780</guid>
		<description>Using a fictional english based language ...

Function RevStr(GetStr as String)
   For i=1 to Length(GetStr)
     NewStr = NewStr &amp; Left(Right(GetStr,i),1)
   Next i
   Return(NewStr)
End Function</description>
		<content:encoded><![CDATA[<p>Using a fictional english based language &#8230;</p>
<p>Function RevStr(GetStr as String)<br />
   For i=1 to Length(GetStr)<br />
     NewStr = NewStr &amp; Left(Right(GetStr,i),1)<br />
   Next i<br />
   Return(NewStr)<br />
End Function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Wargo</title>
		<link>http://www.rickwargo.com/2008/05/02/what-technical-tests-do-you-give-potential-hires/comment-page-1/#comment-32312</link>
		<dc:creator>Rick Wargo</dc:creator>
		<pubDate>Fri, 09 Apr 2010 14:49:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.rickwargo.com/?p=132#comment-32312</guid>
		<description>That is basically identical to Shyam&#039;s posting with the same problem; it doesn&#039;t work on static strings. As soon as you attempt to change the string, an exception is raised:
&lt;code&gt;
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x0000000100000eda
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>That is basically identical to Shyam&#8217;s posting with the same problem; it doesn&#8217;t work on static strings. As soon as you attempt to change the string, an exception is raised:<br />
<pre><code>
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x0000000100000eda
</code></pre></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rajendra Kumar Uppal</title>
		<link>http://www.rickwargo.com/2008/05/02/what-technical-tests-do-you-give-potential-hires/comment-page-1/#comment-32212</link>
		<dc:creator>Rajendra Kumar Uppal</dc:creator>
		<pubDate>Tue, 30 Mar 2010 16:49:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.rickwargo.com/?p=132#comment-32212</guid>
		<description>What about this?

char* mystrrev(char* s)
{
	char* start = s;
	char* left  = s;
	char c;
	while (*s++);
	    s -= 2;
	while (left &lt; s)
	{
		c		= *left;
		*left++ = *s;
		*s--	= c;
	}
	return start;
}</description>
		<content:encoded><![CDATA[<p>What about this?</p>
<p>char* mystrrev(char* s)<br />
{<br />
	char* start = s;<br />
	char* left  = s;<br />
	char c;<br />
	while (*s++);<br />
	    s -= 2;<br />
	while (left &lt; s)<br />
	{<br />
		c		= *left;<br />
		*left++ = *s;<br />
		*s&#8211;	= c;<br />
	}<br />
	return start;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Wargo</title>
		<link>http://www.rickwargo.com/2008/05/02/what-technical-tests-do-you-give-potential-hires/comment-page-1/#comment-31374</link>
		<dc:creator>Rick Wargo</dc:creator>
		<pubDate>Tue, 15 Dec 2009 22:09:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.rickwargo.com/?p=132#comment-31374</guid>
		<description>That works well but limits itself to the type of input - won&#039;t work well on a static string.</description>
		<content:encoded><![CDATA[<p>That works well but limits itself to the type of input &#8211; won&#8217;t work well on a static string.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shyam</title>
		<link>http://www.rickwargo.com/2008/05/02/what-technical-tests-do-you-give-potential-hires/comment-page-1/#comment-31338</link>
		<dc:creator>Shyam</dc:creator>
		<pubDate>Mon, 14 Dec 2009 09:33:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.rickwargo.com/?p=132#comment-31338</guid>
		<description>10 Lines code:
void rev(char *in)
{
   char *en = in;
   while(*en) en++;
   en--;
   while(in&lt;en)
   {
     char temp=*en;
     *en-- = *in;
     *in++=temp;
   }
}</description>
		<content:encoded><![CDATA[<p>10 Lines code:<br />
void rev(char *in)<br />
{<br />
   char *en = in;<br />
   while(*en) en++;<br />
   en&#8211;;<br />
   while(in&lt;en)<br />
   {<br />
     char temp=*en;<br />
     *en&#8211; = *in;<br />
     *in++=temp;<br />
   }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Wargo</title>
		<link>http://www.rickwargo.com/2008/05/02/what-technical-tests-do-you-give-potential-hires/comment-page-1/#comment-31270</link>
		<dc:creator>Rick Wargo</dc:creator>
		<pubDate>Fri, 11 Dec 2009 15:20:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.rickwargo.com/?p=132#comment-31270</guid>
		<description>@Rajendra - Jigsaw actually the in-place solution correct - and it works for both even and odd length strings.</description>
		<content:encoded><![CDATA[<p>@Rajendra &#8211; Jigsaw actually the in-place solution correct &#8211; and it works for both even and odd length strings.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Wargo</title>
		<link>http://www.rickwargo.com/2008/05/02/what-technical-tests-do-you-give-potential-hires/comment-page-1/#comment-31269</link>
		<dc:creator>Rick Wargo</dc:creator>
		<pubDate>Fri, 11 Dec 2009 15:16:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.rickwargo.com/?p=132#comment-31269</guid>
		<description>@Rajendra - Mark actually has it correct. This pattern is also very common in recursive functions: depending on when you call yourself, it completely changes the output (start vs end of routine). So by saying &quot;string.charAt(i) + result&quot; reverses the string; if he would have put &quot;result + string.charAt(i)&quot; then he would have reproduced the string.</description>
		<content:encoded><![CDATA[<p>@Rajendra &#8211; Mark actually has it correct. This pattern is also very common in recursive functions: depending on when you call yourself, it completely changes the output (start vs end of routine). So by saying &#8220;string.charAt(i) + result&#8221; reverses the string; if he would have put &#8220;result + string.charAt(i)&#8221; then he would have reproduced the string.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rajendra Uppal</title>
		<link>http://www.rickwargo.com/2008/05/02/what-technical-tests-do-you-give-potential-hires/comment-page-1/#comment-30782</link>
		<dc:creator>Rajendra Uppal</dc:creator>
		<pubDate>Tue, 24 Nov 2009 19:32:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.rickwargo.com/?p=132#comment-30782</guid>
		<description>CAN WE DO IT WITHOUT USING ANOTHER STRING?
I mean, what if the input string is large say 1000 chars long than according to the solutions provided above you are using extra space(in bytes) of equal to length of the string.

@Rick
How can we please come out of the space time complexity tread-off?

@Mark
You are just copying the input string and returning it back!!

@Anuj
You are just printing it reversely!!</description>
		<content:encoded><![CDATA[<p>CAN WE DO IT WITHOUT USING ANOTHER STRING?<br />
I mean, what if the input string is large say 1000 chars long than according to the solutions provided above you are using extra space(in bytes) of equal to length of the string.</p>
<p>@Rick<br />
How can we please come out of the space time complexity tread-off?</p>
<p>@Mark<br />
You are just copying the input string and returning it back!!</p>
<p>@Anuj<br />
You are just printing it reversely!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Klinchin</title>
		<link>http://www.rickwargo.com/2008/05/02/what-technical-tests-do-you-give-potential-hires/comment-page-1/#comment-30256</link>
		<dc:creator>Mark Klinchin</dc:creator>
		<pubDate>Mon, 09 Nov 2009 05:52:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.rickwargo.com/?p=132#comment-30256</guid>
		<description>Hi Rick, it&#039;s very cute task for the interview. You have interesting observations about it. Here is Java version for your collection. It was nice to meet you at SPS Philly. Mark.

	private static String reverse(String string) {
		String result = &quot;&quot;;
		for(int i=0; i&lt;string.length(); i++) 
			result = string.charAt(i) + result;
		return result;
	}</description>
		<content:encoded><![CDATA[<p>Hi Rick, it&#8217;s very cute task for the interview. You have interesting observations about it. Here is Java version for your collection. It was nice to meet you at SPS Philly. Mark.</p>
<p>	private static String reverse(String string) {<br />
		String result = &#8220;&#8221;;<br />
		for(int i=0; i&lt;string.length(); i++)<br />
			result = string.charAt(i) + result;<br />
		return result;<br />
	}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
