saturn comments on Quixey Engineering Screening Questions - Less Wrong

2 Post author: Liron 09 October 2010 10:33AM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (22)

You are viewing a single comment's thread.

Comment author: saturn 09 October 2010 05:10:40PM 0 points [-]

Are the requirements for problem 2 intended to rule out any form of recursion?

Comment author: Liron 09 October 2010 06:31:25PM 0 points [-]

No.

Comment author: viny 06 April 2011 07:50:19AM 0 points [-]

Not sure what all being said above, but cant it be done in just a simple way like

<SCRIPT LANGUAGE="JavaScript"> <!-- Begin function fireup(i) { alert(i); i=i+1; if(i>10) { return false; }else{ fireup(i); }

} // End --> </script>

I accept, one gets good set of logics from a good and sound education, but i have to say that in field programing a lot of time experience helps to get simple and straight forward solution for your requirements. Optimization can follow on.

Comment author: Liron 06 April 2011 09:06:36PM 0 points [-]

This solution is correct, but only works up to i ~= 30,000 because of stack depth limits.