POV-Ray : Newsgroups : povray.off-topic : Interesting interview questions Server Time
4 Sep 2024 19:19:40 EDT (-0400)
  Interesting interview questions (Message 21 to 30 of 63)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: nemesis
Subject: Re: Interesting interview questions
Date: 20 Jan 2010 19:59:23
Message: <4b57a6eb$1@news.povray.org>
Darren New wrote:
> Google had a lot of these kinds of questions. Stuff like "how can you 
> determine how big a machine's cache is?"
> 
> I couldn't figure out if they wanted a program to measure the timing of 
> something assuming different cache sizes and look for the step in the 
> timing, or "look it up in the x86 instruction set manual".

I would just write:  "I'd google for it".  a bit of butt-kissing can't 
hurt... :D


Post a reply to this message

From: Darren New
Subject: Re: Interesting interview questions
Date: 20 Jan 2010 20:00:46
Message: <4b57a73e$1@news.povray.org>
Jim Henderson wrote:
> That makes more sense - but fairly easy to answer algebraically.

That's why I think the original poster meant to ask the later questions, 
which are somewhat trickier.

>>> And I'm not sure that discarding the length of the track allows the
>>> question to be answered even then.
>> No, that would eliminate the ability to answer.
> 
> How so?  If you know the distances and speeds, 

Oh, you're discarding the length of the track, but you still know the distances?

I don't understand, but ... nevermind. :-)

>> You want to average 60MPH over two minutes. You go 30MPH for the first
>> mile. How fast do you have to go to average 60MPH for two minues?
>>
>> Second alternate question: you want to average 60 MPH. You drive 10
>> miles at 30MPH. How many miles do you need to drive at 90MPH to average
>> 60MPH?
> 
> I agree, that question formulation would be easier to answer.

Well, except for the first one. And the second one is unobvious, easy to 
fall into a trap.

-- 
Darren New, San Diego CA, USA (PST)
   Forget "focus follows mouse." When do
   I get "focus follows gaze"?


Post a reply to this message

From: Darren New
Subject: Re: Interesting interview questions
Date: 20 Jan 2010 20:02:17
Message: <4b57a799$1@news.povray.org>
Jim Henderson wrote:
> Now my brain is going to be busy for the next month..... ;-)

It took me a while, but it became easy once you think about it logically and 
approach the problem systematically.

-- 
Darren New, San Diego CA, USA (PST)
   Forget "focus follows mouse." When do
   I get "focus follows gaze"?


Post a reply to this message

From: Jim Henderson
Subject: Re: Interesting interview questions
Date: 20 Jan 2010 21:33:51
Message: <4b57bd0f$1@news.povray.org>
On Wed, 20 Jan 2010 17:00:45 -0800, Darren New wrote:

> Jim Henderson wrote:
>> That makes more sense - but fairly easy to answer algebraically.
> 
> That's why I think the original poster meant to ask the later questions,
> which are somewhat trickier.

Likely, yes.

>>>> And I'm not sure that discarding the length of the track allows the
>>>> question to be answered even then.
>>> No, that would eliminate the ability to answer.
>> 
>> How so?  If you know the distances and speeds,
> 
> Oh, you're discarding the length of the track, but you still know the
> distances?

Wait, what?  No, I was saying that the length of the track is a critical 
missing piece of information in the original question (the question 
specifically states the length doesn't matter - but I believe it does).

> I don't understand, but ... nevermind. :-)

Are we having one of our "we're both saying the same thing" moments 
again? ;-)

>>> You want to average 60MPH over two minutes. You go 30MPH for the first
>>> mile. How fast do you have to go to average 60MPH for two minues?
>>>
>>> Second alternate question: you want to average 60 MPH. You drive 10
>>> miles at 30MPH. How many miles do you need to drive at 90MPH to
>>> average 60MPH?
>> 
>> I agree, that question formulation would be easier to answer.
> 
> Well, except for the first one. And the second one is unobvious, easy to
> fall into a trap.

True.

Jim


Post a reply to this message

From: Jim Henderson
Subject: Re: Interesting interview questions
Date: 20 Jan 2010 21:34:11
Message: <4b57bd23$1@news.povray.org>
On Thu, 21 Jan 2010 00:00:38 -0200, nemesis wrote:

> Darren New wrote:
>> Google had a lot of these kinds of questions. Stuff like "how can you
>> determine how big a machine's cache is?"
>> 
>> I couldn't figure out if they wanted a program to measure the timing of
>> something assuming different cache sizes and look for the step in the
>> timing, or "look it up in the x86 instruction set manual".
> 
> I would just write:  "I'd google for it".  a bit of butt-kissing can't
> hurt... :D

That wouldn't work so well if you were interviewing at Yahoo. ;-)

Jim


Post a reply to this message

From: Jim Henderson
Subject: Re: Interesting interview questions
Date: 20 Jan 2010 21:35:23
Message: <4b57bd6b$1@news.povray.org>
On Wed, 20 Jan 2010 17:02:16 -0800, Darren New wrote:

> Jim Henderson wrote:
>> Now my brain is going to be busy for the next month..... ;-)
> 
> It took me a while, but it became easy once you think about it logically
> and approach the problem systematically.

I have a vague idea of how it could be implemented - but like the 
interview I did with a software engineering department years ago (where I 
had a similar 'problem solving' type of question to answer during one of 
the interviews) translating that into usable code is a skill I haven't 
spent a lot of time developing.

Jim


Post a reply to this message

From: scott
Subject: Re: Interesting interview questions
Date: 21 Jan 2010 02:52:43
Message: <4b5807cb$1@news.povray.org>
> You have an infinitely long line. Two robots are dropped on parachutes 
> onto the line at random, and each drops its parachute (leaving it behind) 
> where it lands. Your task is to crash the two robots into each other.
>
> Each robot runs the identical program starting at the beginning, and the 
> parachutes are identical, and they are in all ways identical other than 
> where they land, which is random.
>
> You have the following instructions available for programming the robots:
>
> Move the robot one step left.
>
> Move the robot one step right.
>
> Move the instruction pointer to a particular instruction (i.e., "goto")
>
> Skip the following instruction if you're standing on a parachute.

Wow that's a good one.

Given that both programs are identical, you'll need to use the fact that the 
only difference in the "input" is that one robot has another parachute to 
his left, and one has another parachute to his right.

Something like this should work (I think):







(spolier space)


















.slow_loop
Move left
Move right
Move left
Skip_next_if_parachute
Goto slow_loop

.fast_loop
Move left
Goto fast_loop


Post a reply to this message

From: Tim Attwood
Subject: Re: Interesting interview questions
Date: 21 Jan 2010 04:55:11
Message: <4b58247f@news.povray.org>
> I agree that some do see useful.  I like #19, probably partly because I
> know how I'd answer:  "Roughly one per space where a light bulb can be
> fitted to the fixture."  (This would allow for some of the fixtures to be
> empty).

Sure, but it doesn't account for the stack of spare bulbs in the
janitor's closet.


Post a reply to this message

From: Jim Henderson
Subject: Re: Interesting interview questions
Date: 21 Jan 2010 11:33:33
Message: <4b5881dd$1@news.povray.org>
On Thu, 21 Jan 2010 01:55:13 -0800, Tim Attwood wrote:

>> I agree that some do see useful.  I like #19, probably partly because I
>> know how I'd answer:  "Roughly one per space where a light bulb can be
>> fitted to the fixture."  (This would allow for some of the fixtures to
>> be empty).
> 
> Sure, but it doesn't account for the stack of spare bulbs in the
> janitor's closet.

Interesting thought, hadn't thought of that one. :-)

Jim


Post a reply to this message

From: Darren New
Subject: Re: Interesting interview questions
Date: 21 Jan 2010 11:50:40
Message: <4b5885e0$1@news.povray.org>
scott wrote:
> Wow that's a good one.

That was fun, wasn't it? :-) It took me a while to come up with the "only 
way", and then another moment to figure out I needed the initial 
instructions of your first loop (cleverly avoiding spoilers), but once you 
see the answer, it all falls together in an "of course that's how you have 
to do it" sort of way.

-- 
Darren New, San Diego CA, USA (PST)
   Forget "focus follows mouse." When do
   I get "focus follows gaze"?


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.