It's not what you know, it's who you know?

Still, if the reviewer is just being ornery you might as well have fun with
the situation... and then go elsewhere.

Oh, and here's a version that should be easy to translate into many other
languages:
   (3*2*8),(4*2*8),(4*3*8),(4*3*2)

Thanks,

-- 
Raul



On Thu, Mar 27, 2014 at 5:59 PM, Murray Eisenberg <[email protected]>wrote:

> I could well imagine most interviewers today rejecting such a terse answer
> out of hand!
>
>
> On 27 Mar 2014 15:37:31 -0400, Dan Bron <[email protected]> wrote:
>
> > A question on StackExchange [1]:
> >
> > "
> >   I was asked the following interview question over the phone:
> >   Given an array of integers, produce an array whose values
> >   are the product of every other integer excluding the current index.
> >
> >   Example:
> >   [4, 3, 2, 8] -> [3*2*8, 4*2*8, 4*3*8, 4*3*2] -> [48, 64, 96, 24]
> > "
> >
> > His answer is given in the postscript. It spans 3 kilobytes over 86
> lines.
> > The community's responses aren't much of an improvement (by that metric;
> > by other metrics - Java-specific ones, they decent advancements).
> >
> > The J answer?
> >
> >   1 */\. 4 3 2 8
> > 48 64 96 24
> >
> > Could've answered the interviewer in a sentence, right over the phone.
> >
> > -Dan
> >
> >
> > [1] Code Review StackExchange question
> >    "Array whose values are the product of every other integer":
> >
> >
> http://codereview.stackexchange.com/questions/45498/array-whose-values-are-the-product-of-every-other-integer
>
> ——
> Murray Eisenberg                     [email protected]
> Mathematics & Statistics Dept.
> Lederle Graduate Research Tower      phone 240 246-7240 (H)
> University of Massachusetts
> 710 North Pleasant Street
> Amherst, MA 01003-9305
>
>
>
>
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to